Python Script to create AWS S3 Storage Class Analysis
Budget: $30 – $250 CAD
We need a boto3 python script that will:
- Authenticate with assume role (run on an ec2 with IAM role assigned to it)
- Go through each S3 Bucket in every region
- If a bucket does NOT have a Storage Class Analysis
THEN
- Create a storage Storage Class Analysis
-- Name: BSI_Config
-- Apply to all objects in bucket
AWS Documentation and screenshot of config attached
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.put_bucket_analytics_configuration
- Authenticate with assume role (run on an ec2 with IAM role assigned to it)
- Go through each S3 Bucket in every region
- If a bucket does NOT have a Storage Class Analysis
THEN
- Create a storage Storage Class Analysis
-- Name: BSI_Config
-- Apply to all objects in bucket
AWS Documentation and screenshot of config attached
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.put_bucket_analytics_configuration