Clean Up Unused AWS Resources — EBS Volumes, EIPs, Old AMIs with Cost Report
Python script to find and delete unattached EBS volumes, unassociated Elastic IPs, and old AMIs, then produce a JSON cost-savings report.
Python script to find and delete unattached EBS volumes, unassociated Elastic IPs, and old AMIs, then produce a JSON cost-savings report.
Code examples covering structured logging, credential management, idempotent operations, environment configuration, Secrets Manager …
Python decorator that adds automatic retry logic with exponential backoff and jitter to any boto3 API call, handling ThrottlingException and …
Python utility function that handles pagination for any boto3 API call generically, with automatic NextToken handling, filtering support, …
Python script that uses AWS Organizations to list all accounts, assumes a cross-account role in each, audits security controls, and …
Python script to start an AWS CodePipeline execution, poll stage progress, and post real-time Slack notifications as each stage succeeds, …
Lambda function triggered by EventBridge to detect any AWS root account API activity in CloudTrail and immediately send a critical security …
Python script to deploy a new container image to an ECS service with rolling update strategy, monitor health, and automatically roll back if …
Python script to audit all VPC Security Groups, identify rules that expose sensitive ports to the internet, and optionally auto-remediate …
Python script to analyse EC2 on-demand spend via AWS Cost Explorer and surface Savings Plan and Reserved Instance purchase recommendations …
Python script to create an RDS snapshot before every deployment and restore the database from that snapshot (or to a specific point in time) …
Python script to create CloudWatch alarms for every running EC2 instance covering CPU utilization, status checks, memory usage (via …
Python script to deploy or update a Lambda function, update environment variables, publish a new version, and create an alias with canary …
Python script that analyses CloudTrail logs for a given IAM role and generates a minimal IAM policy containing only the actions the role …
Python script to find all IAM users with access keys older than 90 days, create new keys, deactivate old ones, and notify users via AWS SES.
Python script to audit all S3 buckets for public access exposure, disabled versioning, missing encryption, and access logging gaps — with a …
Python script to sync a local directory to S3, encrypt every file with a KMS key, skip unchanged files via MD5 check, and produce a JSON …
Python script to find EC2 instances running for more than 7 days without a Project tag and send a compliance alert email using AWS SES.
Write a Python boto3 script to snapshot all EBS volumes attached to running EC2 instances and automatically delete snapshots older than 30 …
Write a Python boto3 script that reads the AutoStop=true tag on EC2 instances and automatically stops them at 8 PM and starts them at 8 AM — …
30+ Python interview questions for AWS and DevOps roles - boto3, Lambda, S3, automation scripting, CI/CD, Docker SDK, Kubernetes client, …