DEV Community

Discussion on: ๐Ÿš” Policing with Amazon Macie - Security & Compliance

Collapse
 
anuvindhs profile image
Anuvindh • Edited

I belive its worth mentioning a legacy solution s3-inspector from Clario.

here is a small tutorial in case you want to practice it

Create IAM user

Comments / Action Screenshot
Go to IAM, click on Users & Select Add user. Name and tick Programmatic access and click next Image nameIAM
Now select Attach existing policies directly and add AmazonS3ReadOnly policy then review and c*reate user* Image policy

Copy your credentials to a notepad or download it .

Configure AWS CLI

Create a s3readonly aceess user and get programatic access key.

Lets setup AWS CLI, goto your terminal (Linux)
enter

aws configure
Enter fullscreen mode Exit fullscreen mode

Enter your AWS Access Key ID & AWS Secret Access Key

Get the code

Currently i have forked the code in GitHub

For Linux(Debian)

wget https://raw.githubusercontent.com/anuvindhs/s3-inspector/master/s3inspector.py
Enter fullscreen mode Exit fullscreen mode

Execution

python s3inspector.py
Enter fullscreen mode Exit fullscreen mode

This script is known for false positives , also if you get error during execution
try

sudo apt install python-pip
pip install termcolor

Enter fullscreen mode Exit fullscreen mode

or you can get the code and improvise your self as well

Collapse
 
abc_wendsss profile image
Wendy Wong

Thanks for sharing CLI tips!

Collapse
 
anuvindhs profile image
Anuvindh

You are welcome Wendy