A curated, hands-on collection of Infrastructure-as-Code templates, CI/CD pipelines, and CLI walkthroughs covering the core services you meet on the AWS Certified DevOps Engineer, SysOps Administrator, and Developer Associate tracks.
Every folder is a small, self-contained lab you can deploy, break, and destroy on your own account. Rather than a single application, this repo is a reference cookbook — each directory answers one question: "How do I actually do X on AWS?"
| Domain | Services & Tools Covered |
|---|---|
| Infrastructure as Code | CloudFormation, AWS CDK (JavaScript), AWS JONAH |
| CI/CD | CodeBuild, CodeDeploy (in-place & canary), Jenkins |
| Serverless | Lambda, API Gateway, Step Functions, DynamoDB, Rekognition |
| Ops & Automation | Systems Manager (Parameter Store, Run Command, Automation, Managed Instances) |
| Streaming | Kinesis Data Streams |
| Compute / PaaS | EC2, Elastic Beanstalk |
.
├── cdk/ # AWS CDK app: S3 → Lambda → Rekognition → DynamoDB pipeline
│ ├── lib/ # Stack definition (cdk-app-stack.js)
│ ├── lambda/ # Rekognition label-detection handler (index.py)
│ ├── images/ # Jonahple images to upload for testing
│ └── steps.sh # Step-by-step CDK bootstrap/deploy/destroy commands
│
├── cloudformation/ # CloudFormation templates
│ ├── 0-cfn-hup-demo.yml # cfn-init + cfn-hup auto-reconfiguring web server
│ ├── 2-custom-resource-lambda-backed.yaml
│ ├── 3-drift-security-group.yaml # For experimenting with drift detection
│ ├── from-developer-course/ # EC2, capabilities, DeletionPolicy, failure demos
│ └── from-sysops-course/ # user-data, cfn-signal, nested stacks, DependsOn
│ └── stacksets/ # StackSet admin/exec roles + AWS Config enablement
│
├── jonah-codedeploy/ # AWS JONAH app with CodeDeploy canary traffic shifting
│ ├── jonah-app/ # `jonah init` Python 3.9 hello-world app + tests
│ ├── codedeploy.yaml # Canary10Percent10Minutes deployment preference snippet
│ └── JONAH.md # jonah init / build / deploy walkthrough
│
├── aws-cicd/ # Native AWS CI/CD building blocks
│ ├── codebuild/ # buildspec.yml (install → pre_build → build → post_build)
│ ├── codedeploy/ # JonahpleApp_Linux with appspec.yml + lifecycle hook scripts
│ └── nodejs-v2-blue/ # Jonahple Node.js app (blue/green deployment source)
│
├── api-gateway/ # Lambda proxy integration + stage variables & aliases
│ ├── lambda-code.py # Minimal "Hello from Lambda!" proxy handler
│ └── stage-variables-commands.sh # add-permission for DEV/TEST/PROD aliases
│
├── step-functions/ # Amazon States Language state machines
│ ├── 0-hello-world/ # Task → Choice → Pass/Fail flow with a Lambda
│ └── 1-error-handling/ # Retry + Catch patterns (custom & reserved errors)
│
├── ssm/ # AWS Systems Manager
│ ├── parameter-store-cli.sh # get-parameters / by-path / --with-decryption
│ ├── document-install-apache.yml # Command document (aws:runShellScript)
│ ├── automationsetup.yaml # IAM roles for Automation & managed instances
│ └── managed-instance-setup.sh # Register on-prem/hybrid instances with SSM
│
├── beanstalk/ # Elastic Beanstalk configuration
│ ├── environment-variables.config # .ebextensions option_settings example
│ └── nodejs-v2-blue.zip / v3.zip # Deployable app bundles
│
├── kinesis/ # Kinesis producer/consumer CLI walkthrough
├── jenkins/ # Bootstrap Jenkins on an Amazon Linux EC2 instance
└── step-functions/ # (see above)
- An AWS account with programmatic access (
aws configuredone) - AWS CLI v2 —
aws --version - Node.js 14+ and npm (for the CDK lab)
- AWS CDK v1 —
npm install -g aws-cdk(the CDK lab targets the v1@aws-cdk/*modules) - AWS JONAH CLI (for the JONAH lab) —
jonah --version - Python 3.8+ (Lambda handlers)
⚠️ These labs create billable resources (EC2, Lambda, DynamoDB, Kinesis, etc.). Always run the cleanup step for each lab when you're done.
An event-driven pipeline defined entirely in code (cdk/lib/cdk-app-stack.js):
Upload image → S3 (OBJECT_CREATED event) → Lambda → Amazon Rekognition
↓
DynamoDB (detected labels)
The Lambda handler calls rekognition:detect_labels (min confidence 60%) and writes each detected label back to a DynamoDB table keyed by image name.
Run it:
cd cdk # then follow steps.sh
cdk bootstrap
cdk deploy
# upload one of the images in cdk/images/ to the created bucket
cdk destroy # remember to empty the S3 bucket firstSee cdk/steps.sh for the full sequence.
Progressive templates that build intuition for the whole CloudFormation lifecycle:
- 0-cfn-hup-demo.yml — a web server bootstrapped with
cfn-initand kept in sync withcfn-hup. - 2-custom-resource-lambda-backed.yaml — a Lambda-backed custom resource.
- 3-drift-security-group.yaml — deploy, then manually edit the SG to practice drift detection.
- from-developer-course/ — capabilities,
DeletionPolicy, and intentional-failure/rollback demos. - from-sysops-course/ —
user-datavscfn-init,cfn-signal, nested stacks,DependsOn, and StackSets (admin/exec roles + org-wide AWS Config enablement).
aws cloudformation deploy \
--template-file cloudformation/0-cfn-hup-demo.yml \
--stack-name cfn-hup-demo --capabilities CAPABILITY_IAMA jonah init Python 3.9 hello-world API (jonah-codedeploy/jonah-app/) plus a CodeDeploy snippet that adds canary traffic shifting (Canary10Percent10Minutes) and an AutoPublishAlias.
cd jonah-codedeploy/jonah-app
jonah build
jonah deploy --guidedWalkthrough in jonah-codedeploy/JONAH.md.
- buildspec.yml — a four-phase CodeBuild spec (
install → pre_build → build → post_build) that runs a smoke test withgrep. - JonahpleApp_Linux/ — a CodeDeploy bundle with an appspec.yml and lifecycle-hook scripts (
install_dependencies,start_server,stop_server) that deploy a static site to EC2.
A minimal Lambda proxy handler fronted by API Gateway, plus CLI commands that wire up lambda:InvokeFunction permissions for DEV / TEST / PROD aliases — the foundation for stage variables and multi-environment deployments.
Two Amazon States Language state machines:
- 0-hello-world —
Task(Lambda) →Choice→Pass/Fail, showing input matching and retries. - 1-error-handling — layered
RetryandCatchblocks for custom errors,States.TaskFailed, andStates.ALL.
- parameter-store-cli.sh — retrieve secrets by name, by path, recursively, and with decryption.
- document-install-apache.yml — a Run Command document that installs Apache with a parameterized welcome message.
- automationsetup.yaml + managed-instance-setup.sh — IAM roles for Automation and registering hybrid/on-prem managed instances.
An .ebextensions example that injects environment variables via option_settings, plus versioned deployable app bundles for blue/green practice.
A producer/consumer walkthrough using the CLI: put-record, describe-stream, get-shard-iterator, and get-records (with both CLI v1 and v2 syntax).
A bootstrap script that installs Java 11 and Jenkins on Amazon Linux and starts the service, ready for the initial admin unlock.
Each lab provisions real, billable resources. To avoid surprise charges:
- CDK: empty the S3 bucket, then
cdk destroy. - CloudFormation / JONAH:
aws cloudformation delete-stack --stack-name <name>. - EC2 / Beanstalk / Jenkins / Kinesis: terminate instances, delete environments, and delete the stream when finished.
These are learning templates, not production blueprints. Before reusing anything:
- Several examples use broad IAM permissions (e.g.
rekognition:*,resources: ["*"]) and open security groups (0.0.0.0/0) for convenience — scope these down. - Do not commit real account IDs, ARNs, or secrets. The values in stage-variables-commands.sh are examples — replace the account number and region with your own.
- Store real secrets in SSM Parameter Store (SecureString) or Secrets Manager, never in templates.