What is Aws Macie ? How to discover data with Macie ?

Orhan Kamo - Oct 23 - - Dev Community

The size and value of data is increasing day by day, and where the data is and who accesses it has become the most important job of data security. While we can make data discovery with data lost prevention (DLP) products, let's examine how we can do this in our aws s3 buckets.

Image description

Amazon Macie discovers sensitive data using machine learning and pattern matching, provides visibility into data security risks, and enables automated protection against those risks. Macie work with EventBridge and Therefor you can take action ( for example using with Lambda, SNS ).

What we can discovery ?
PII
Credirt Cart
Aws Account
Bank Account
IBAN, Tax ID ...
what you need ( with Regular Expression )

Image description

Scenario
There is a bucket called "s3macie" and we will upload a text containing a Turkish Identity number here. Then we create a job by enabling Macie and wait for it to find it in the scan.
We created a bucket named s3macie and enable Macie.

Image description
Get started

Image description
Enable Macie

We create job ( Discover data )

Image description

Choose S3 Buckets

Image description

Step: Refine the Scope ( Schedule job, include , exclude)

Image description

Step: Select Managed Data Identifiers ( select pattern or list of custom regular expression part)

Image description

we want to discover Turkish Identity Number .That's why i go with "custom"

Image description

List of custom pattern . We create new condition here

Image description

Create new

Image description

I write regex and test Turkish Identity Number ( rigt side )

Image description

Back to "Select custom data identifiers"

Image description

Step: Enter General Setting enter value and "Next"

Image description

End we create the job

Image description

We upload the file ( include test Turkish Identity Number

Image description

Finally We find critical data on S3 buckest with Macie

Image description

. .