Skip to main content
In this lesson, we will demonstrate how to work with AWS Macie to identify sensitive data in your S3 buckets. AWS Macie is a powerful security service that uses machine learning to recognize personally identifiable information (PII) and other sensitive data types. Follow along as we walk through the process step-by-step.

Step 1: Enable AWS Macie

Begin by signing in to the AWS Management Console and searching for “Macie” in the search window. Select “Get Started” to enable AWS Macie.
Click on Enable Macie to activate its functionality. Once enabled, you can configure Macie to scan your S3 buckets for sensitive data.

Step 2: Generate Test Data

To verify that Macie correctly identifies sensitive data, we will generate some test files. In this demo, we have three example files:
  1. addresses.txt
    This file contains dummy addresses from the United States. Each address represents personal information that ideally should not be stored in an S3 bucket.
The image shows a text editor displaying a list of addresses in a file named "addresses.txt." The addresses are formatted with street names, cities, states, and ZIP codes.
  1. credit_cards.txt
    This file includes a list of credit card details with card numbers, expiration dates, and verification numbers. Below is a sample of the content:
1 VISA, 4916245657687972, 7/2030, 352 2 VISA, 4556276704904925, 6/2024, 616 3 VISA, 4929642655495499, 11/2029, 288 4 VISA, 4024007142950408, 8/2027, 897 5 VISA, 4716370077620671, 3/2025, 876 6 VISA, 4533220187054539, 9/2026, 102 7 VISA, 4539956991960712, 10/2030, 930 8 VISA, 4929085085149061, 6/2028, 674 9 VISA, 4532470873521771, 10/2027, 929 10 VISA, 4024007128445607, 10/2023, 732 11 VISA, 4485583681960705, 12/2025, 672