Hands-on projects to automate actions in AWS using Boto3 Python SDK
Boto3 is the Python-based SDK for Amazon Web Services, enabling programmatic control services.
Instructor: Hari Kammana
Using Boto3 within Lambda Functions to manage S3, DynamoDB, CloudWatch, EC2, AMIs, SNS, & SES
Description | Services Used | Link ↗ |
---|---|---|
Find unused Elastic IPs and send alert email using SES and Lambda environmental variables | Lambda EC2 SES |
find and email unused eips.py |
Detect unattached EBS volumes and send alert email using SNS | Lambda EC2 SNS |
unused volumes.py |
Persist CSV data to DynamoDB when file is uploaded to an S3 bucket | Lambda S3 DynamoDB |
s3 csv to dynamodb.py |
Persist JSON data to DynamoDB when S3 file upload triggers a CloudWatch log event | Lambda S3 DynamoDB CloudWatchLogs |
s3 json to dynamodb.py |
Send Slack message via webhook to alert when an instance has stopped | Lambda |
slack alert.py |
Using Boto3 Terminal Scripts to manage EC2 Instances, EBS Volumes, & AMIs
Description | Services Used | Link ↗ |
---|---|---|
Query contents of CSV file stored in S3 | S3 |
s3 query csv select object content.py |
Batch write data to DynamoDB table | DynamoDB |
dynamobd batch write.py |
Get and delete items from DynamoDB table | DynamoDB |
dynamobd get and delete.py |
Email list of EBS Snapshots based on tags | EC2 SNS |
ebs snapshots email.py |
Create AMI & copy to another region | EC2 |
create image copy to diff region.py |
Describe instances and related attributes | EC2 |
describe instances.py |
Filter & manage instances using EC2 resource collections | EC2 |
ec2 collections.py |
Launch new intances based on AMI & instance type | EC2 |
launch ec2.py |
Delete EBS snapshots older than 15 days | EC2 |
remove old ebs snapshots.py |
Deregister unused custom AMIs | EC2 |
remove unused amis.py |
Start, stop, & terminate instances based in Id | EC2 |
sec start stop terminate.py |