How jbalajiavm/boto3-aws works
Repository Role
This is a learning repository for a “100 Days of DevOps” curriculum, not a single deployable application. It contains independent AWS, Terraform, Python, Bash, Kubernetes, Docker, and CI/CD examples. The root README.md is the curriculum index; most directories are standalone execution units.
Entry Points and Execution Model
There is no central runtime or orchestrator. Engineers run artifacts directly according to their technology:
• Terraform roots are applied independently, e.g. main.tf, two-tier-environment/main.tf, and aws-lambda/lambda.tf.
• Python automation scripts are invoked directly, e.g. aws-lambda/lambda.py and boto3/ec2_instance.py.
• Kubernetes resources are applied with kubectl, e.g. argocd_demo/yamls/deployment.yaml.
• Jenkins workflows are executed by Jenkins from docker_jenkins/Jenkinsfile or jenkins-terraform-pipeline/ec2_pipeline/Jenkinsfile.
AWS Infrastructure Provisioning
Terraform is the primary infrastructure-as-code boundary. Small examples provision individual AWS capabilities—S3, KMS, networking, CloudTrail, Lambda, and monitoring—while each directory owns its own state/configuration assumptions.
• Base or standalone stacks: main.tf, cloudtrail.tf, aws_config/main.tf.
• Network and storage examples: nat_gateway/main.tf, s3-crossregion-replication/main.tf, vpc_flow_logs/main.tf.
• Encryption and policy boundaries: kms/main.tf, s3_kms/main.tf, iam_policies/1-1-allow-access-to-EC2-S3.json.
Two-Tier AWS Reference Composition
two-tier-environment/ is the clearest multi-component architecture. Its root Terraform configuration composes modules for VPC networking, EC2 compute, load balancing, Auto Scaling, MySQL RDS, and SNS notifications.
• Composition root: two-tier-environment/main.tf, two-tier-environment/variables.tf.
• Network-to-compute flow: two-tier-environment/vpc_networking/main.tf supplies infrastructure consumed by two-tier-environment/ec2_instance/main.tf and two-tier-environment/auto-scaling/main.tf.
• Request/data path: Application Load Balancer → EC2/Auto Scaling workload → RDS MySQL, represented by two-tier-environment/application_load_balancer/outputs.tf, two-tier-environment/rds_mysql/main.tf, and two-tier-environment/ec2_instance/userdata.tpl.
• Notification output is isolated in two-tier-environment/sns/main.tf.
Event-Driven and Programmatic AWS Automation
Python scripts use AWS SDK/Boto3 and Lambda handlers to operate AWS resources at runtime. IAM trust and permission documents form the security boundary between function execution and EC2 operations.
• Lambda deployment/handler examples: aws-lambda/lambda.py, aws-lambda/ec2_stop_start_instances_updated/lambda.py, aws-lambda/ec2_stop_start_instances_updated/main.tf.
• EC2 lifecycle and inventory scripts: boto3/ec2_instance.py, boto3/ec2_information/retrieve_information_about_ec2.py.
• Cleanup automation targets AMIs, EBS volumes, and snapshots: boto3/cleanup_old_ami/cleanup_old_ami.py, boto3/cleaning_old_ebs_vol/cleaning_old_ebs_vol.py, boto3/snapshot_cleanup/snapshot_cleanup.py.
• External service boundary: AWS APIs for EC2, S3, IAM, Lambda, CloudWatch, SNS, and related services; credentials are expected from the local/AWS execution environment.
Delivery and Container Platforms
The repository demonstrates multiple separate delivery paths rather than one standardized pipeline.
• Jenkins can build/deploy containerized workloads or run Terraform: docker_jenkins/Dockerfile, docker_jenkins/Jenkinsfile, jenkins-terraform-pipeline/ec2_pipeline/main.tf.
• An EKS-oriented example packages a simple static app into a container and deploys it from manifests: eks-codepipeline/Dockerfile, eks-codepipeline/buildspec.yml, eks-codepipeline/manifests/deployment.yaml.
• Kubernetes/cluster configuration examples are independent: argocd_demo/yamls/service.yaml, kind/multi-node-master.yaml, metallb/cm.yaml.
Operational Utilities and Observability
Operational scripts provide local or AWS-facing diagnostics rather than a shared monitoring service. Log parsing, host-performance checks, Kubernetes debugging, and notification examples are standalone tools.
• Apache log parsing: apache_log_parser.py, apache_log_parsing/apache_log_parsing_v4.py.
• Host and service diagnostics: performance_tuning/performance-monitoring.py, python_script_to_check_website_status/script_to_check_website_status.py.
• Kubernetes failure investigation: kubernetes_debugging/kubernetes_debugging_select.sh, kubernetes_debugging/crash_loopback_error.sh.
• AWS alerting infrastructure: monitoring_and_alerting/sns_alert/main.tf, s3eventstosns.tf.
Main entry points: two-tier-environment/main.tf Two-tier composition · README.md Curriculum index · ec2_instance/main.tf EC2 & Auto Scaling · main.tf Standalone Terraform
Components 18
Infrastructure as Code
Independent Terraform roots and modules.
- Standalone Terraform · Provisions isolated AWS capabilities.
main.tf - Security policies · Encryption and access-control examples.
kms/main.tf - Network & storage · NAT, replication, and flow-log examples.
nat_gateway/main.tf
Two-Tier Reference
Composable AWS application environment.
- Two-tier composition · Composes application infrastructure modules.
two-tier-environment/main.tf - VPC networking
two-tier-environment/vpc_networking/main.tf - Application Load Balancer
two-tier-environment/application_load_balancer/outputs.tf - EC2 & Auto Scaling · Application workload and scaling capacity.
two-tier-environment/ec2_instance/main.tf - RDS MySQL
two-tier-environment/rds_mysql/main.tf - SNS notifications
two-tier-environment/sns/main.tf
AWS Automation
Direct Python and Lambda examples.
- Lambda automation · Event-driven EC2 lifecycle example.
aws-lambda/ec2_stop_start_instances_updated/lambda.py - Boto3 scripts · Direct EC2 inventory and lifecycle operations.
boto3/ec2_instance.py - AWS APIs · Credentials come from the local or AWS execution environment.
Delivery & Clusters
Separate CI/CD and Kubernetes examples.
- Jenkins workflows · Builds containers or runs Terraform.
docker_jenkins/Jenkinsfile - EKS app delivery · Buildspec packages a static app for Kubernetes.
eks-codepipeline/buildspec.yml - Kubernetes examples · Applied independently with kubectl.
argocd_demo/yamls/deployment.yaml
Operational Utilities
Standalone diagnostics and alerting.
- Diagnostics scripts · Host, website, log, and Kubernetes troubleshooting.
performance_tuning/performance-monitoring.py - AWS alerting · SNS and S3-event notification infrastructure.
monitoring_and_alerting/sns_alert/main.tf
Other components
- Curriculum index · Entry point for independent learning exercises.
README.md
Connections 21
- Curriculum index → Standalone Terraform: indexes
- Curriculum index → Two-tier composition: indexes
- Curriculum index → Lambda automation: indexes
- Curriculum index → Jenkins workflows: indexes
- Standalone Terraform → AWS APIs: provisions
- Security policies → AWS APIs: configures access
- Network & storage → AWS APIs: provisions
- Two-tier composition → VPC networking: composes
- Two-tier composition → Application Load Balancer: composes
- Two-tier composition → EC2 & Auto Scaling: composes
- Two-tier composition → RDS MySQL: composes
- Two-tier composition → SNS notifications: composes
- VPC networking → EC2 & Auto Scaling: network for
- Application Load Balancer → EC2 & Auto Scaling: routes requests
- EC2 & Auto Scaling → RDS MySQL: uses MySQL
- Lambda automation → AWS APIs: operates
- Boto3 scripts → AWS APIs: operates
- Jenkins workflows → EKS app delivery: builds or deploys
- EKS app delivery → Kubernetes examples: deploys manifests
- Diagnostics scripts → Kubernetes examples: troubleshoots
- AWS alerting → AWS APIs: creates notifications