How rahulchidambaram/aws-automation-with-lambda-boto3 works
This repository is a collection of four independent AWS Lambda automations, not one shared application. Each workflow is initiated by a Lambda invocation, performs a distinct storage, backup, tagging, or cost-monitoring task, and uses Boto3 to interact with AWS services. The README documents EventBridge scheduling or event triggers for the assignments; trigger configuration is not implemented in the sampled Lambda source, so those links are documented rather than inferred from code. IAM policies are permissions configuration, not runtime components.
Main entry points: 03-Auto-Tagging-EC2-Instances-on-Launch/lambda_function.py Launch tagging · 04-Cost-Alert-SNS/lambda_function.py Cost threshold check · 01-Automated-S3-Bucket-Cleanup/lambda_function.py Object cleanup · 02-Automated-EBS-Snapshot-Creation-and-Cleanup/lambda_function.py Snapshot lifecycle
Components 15
Storage cleanup
- Object cleanup
01-Automated-S3-Bucket-Cleanup/lambda_function.py - Amazon S3
EBS backups
- Snapshot lifecycle
02-Automated-EBS-Snapshot-Creation-and-Cleanup/lambda_function.py - Amazon EC2 / EBS
- EventBridge schedule
EC2 tagging
- Launch tagging
03-Auto-Tagging-EC2-Instances-on-Launch/lambda_function.py - EC2 state event
- Launch principal lookup
03-Auto-Tagging-EC2-Instances-on-Launch/lambda_function.py - AWS CloudTrail
- EC2 instance tags
Cost alerts
- Cost threshold check
04-Cost-Alert-SNS/lambda_function.py - Cost Explorer
- Amazon SNS
- Daily schedule
Other components
- Lambda invocation
Connections 13
- Lambda invocation → Object cleanup: invokes
01-Automated-S3-Bucket-Cleanup/lambda_function.py - Object cleanup → Amazon S3: lists and deletes
01-Automated-S3-Bucket-Cleanup/lambda_function.py - Lambda invocation → Snapshot lifecycle: invokes
02-Automated-EBS-Snapshot-Creation-and-Cleanup/lambda_function.py - Snapshot lifecycle → Amazon EC2 / EBS: creates, lists, deletes
02-Automated-EBS-Snapshot-Creation-and-Cleanup/lambda_function.py - EventBridge schedule → Lambda invocation: triggers weekly
- EC2 state event → Launch tagging: invokes
- Launch tagging → Launch principal lookup: looks up owner
03-Auto-Tagging-EC2-Instances-on-Launch/lambda_function.py - Launch principal lookup → AWS CloudTrail: searches events
03-Auto-Tagging-EC2-Instances-on-Launch/lambda_function.py - Launch tagging → EC2 instance tags: writes tags
03-Auto-Tagging-EC2-Instances-on-Launch/lambda_function.py - Lambda invocation → Cost threshold check: invokes
04-Cost-Alert-SNS/lambda_function.py - Cost threshold check → Cost Explorer: queries spend
04-Cost-Alert-SNS/lambda_function.py - Cost threshold check → Amazon SNS: publishes alert
04-Cost-Alert-SNS/lambda_function.py - Daily schedule → Lambda invocation: triggers daily