← Back to Home
Deploying & Managing Infrastructure at Scale
AWS CLF-C02 — CloudFormation, CDK, Beanstalk, CI/CD, Systems Manager, and More
AWS CloudFormation
A declarative way to define your AWS infrastructure as code using JSON or YAML templates.
Key Concepts
- Infrastructure as Code (IaC) — define all your resources in a template file
- CloudFormation creates resources in the right order, with the right configuration
- Free service — you only pay for the resources created
- Each group of resources is called a Stack
- Supports almost every AWS resource
Benefits of IaC
- Reproducibility — create and destroy infrastructure on the fly, replicate across regions/accounts
- Version control — templates stored in Git, track changes over time
- Cost estimation — see costs of resources before creating them
- Automation — no manual resource creation, reducing human error
- Diagram generation — CloudFormation can generate architecture diagrams from templates
- Savings strategy — automate deletion of dev resources at 5 PM and recreation at 8 AM
Exam Tip:
CloudFormation = IaC using templates (JSON/YAML). If the question asks about "repeating infrastructure across environments" or "infrastructure as code," think CloudFormation.
AWS CDK (Cloud Development Kit)
Define cloud infrastructure using familiar programming languages instead of JSON/YAML.
- Supports JavaScript/TypeScript, Python, Java, .NET
- Code is compiled into a CloudFormation template (JSON/YAML)
- Deploy infrastructure and application runtime code together
- Great for developers who prefer programming languages over writing YAML
Key Point:
CDK = write infrastructure in programming languages → compiles to CloudFormation templates. CDK does NOT replace CloudFormation; it generates CloudFormation.
AWS Elastic Beanstalk
A Platform as a Service (PaaS) for deploying applications. Developer-centric view of deploying an application on AWS.
What Beanstalk Handles
- Capacity provisioning and load balancing
- Auto-scaling and application health monitoring
- Instance configuration and deployment
- Uses CloudFormation under the hood
What You Control
- Full control over configuration of all components
- Your application code (you upload it)
- OS, platform, and environment settings
Key Features
- Free service — you pay for the underlying resources (EC2, RDS, ELB, etc.)
- Supports many platforms: Go, Java, .NET, Node.js, PHP, Python, Ruby, Docker
- Three architecture models: single instance, ALB + ASG, worker tier (SQS)
- Health monitoring via a dashboard
Exam Tip:
Beanstalk = PaaS, developer focused, still have full control of resources. You just upload your code. If the question mentions "developer-centric" or "deploy application quickly without managing infrastructure," think Elastic Beanstalk.
AWS Developer Tools (CI/CD Pipeline)
AWS CodeDeploy
- Automate application deployments to EC2, Fargate, Lambda, or on-premises servers
- Works with any server/instance — hybrid service (AWS + on-prem)
- Servers must run the CodeDeploy Agent
- Supports in-place and blue/green deployments
AWS CodeCommit
- AWS-managed Git-based source control repository
- Private Git repositories, fully managed, highly available
- Secure (encrypted, access control via IAM)
- Alternative to GitHub, GitLab, Bitbucket
- Note: AWS announced CodeCommit is no longer accepting new customers (2024)
AWS CodeBuild
- Managed CI (Continuous Integration) service
- Compiles source code, runs tests, produces deployable packages
- Serverless — fully managed, no servers to provision
- Scales automatically, pay per build time
- Uses
buildspec.yml for build instructions
- Alternative to Jenkins
AWS CodePipeline
- Managed CD (Continuous Delivery) service
- Orchestrates the entire CI/CD pipeline: source → build → test → deploy
- Integrates with CodeCommit, CodeBuild, CodeDeploy, Elastic Beanstalk, CloudFormation, GitHub, and third-party tools
- Fast delivery and rapid updates
AWS CodeArtifact
- Managed artifact repository service
- Store, publish, and share software packages
- Works with npm, pip, Maven, NuGet, etc.
- Developers and CodeBuild can retrieve dependencies from CodeArtifact
AWS CodeStar
- Unified UI to manage software development activities in one place
- Quickly set up CodeCommit, CodePipeline, CodeBuild, CodeDeploy, Elastic Beanstalk, EC2, and Lambda
- Project templates, team management, dashboard
| Service | Purpose | Think Of |
| CodeCommit | Source control | GitHub / GitLab |
| CodeBuild | Build & test | Jenkins CI |
| CodeDeploy | Deploy to servers | Automated deployment |
| CodePipeline | Orchestrate CI/CD | Pipeline coordinator |
| CodeArtifact | Package repository | npm registry / Nexus |
| CodeStar | Unified dev dashboard | Project management |
Exam Tip:
Remember the pipeline flow: CodeCommit (code) → CodeBuild (build/test) → CodeDeploy (deploy). CodePipeline orchestrates all of them together.
AWS Cloud9
A cloud-based Integrated Development Environment (IDE).
- Code editor, debugger, and terminal — all in the browser
- Pre-packaged with essential tools for popular programming languages
- Enables pair programming (real-time collaboration)
- Runs on a managed EC2 instance
AWS Systems Manager (SSM)
Manage your EC2 and on-premises infrastructure at scale. A hybrid AWS service.
Key Features
Session Manager
- Start a secure shell on EC2 and on-premises servers
- No SSH access, bastion hosts, or SSH keys needed
- No port 22 needed (better security)
- Supports Linux, macOS, and Windows
- Sends session log data to S3 or CloudWatch Logs
Patch Manager
- Automate the process of patching managed instances
- Supports OS updates, application updates, security updates
- Works with EC2 and on-premises servers
- Patch on schedule using Maintenance Windows
Parameter Store
- Secure, hierarchical storage for configuration data and secrets
- Store passwords, database connection strings, API keys, license codes
- Supports plaintext or encrypted (via KMS) parameters
- Serverless, scalable, durable — free for standard parameters
- Version tracking and notification via EventBridge
Exam Tip:
Session Manager = secure shell without SSH/port 22. Parameter Store = store secrets/configuration. If the exam says "access EC2 without SSH keys," think SSM Session Manager.
AWS OpsWorks
Managed Chef and Puppet service for automated server configuration.
- Use if you are already using Chef or Puppet for configuration management
- Alternative to AWS SSM
- Manage EC2 and on-premises VMs
- OpsWorks = managed Chef/Puppet; if you see either mentioned, think OpsWorks
Key Point:
OpsWorks is the go-to answer when the exam mentions Chef or Puppet. It's a managed service for these configuration management tools.
Deployment & IaC Services Comparison
| Service | Category | Key Differentiator |
| CloudFormation | IaC | Templates (JSON/YAML), declarative |
| CDK | IaC | Programming languages, compiles to CFN |
| Elastic Beanstalk | PaaS | Upload code, everything managed |
| CodeDeploy | Deployment | Deploy to EC2/on-prem, hybrid |
| CodePipeline | CI/CD Orchestration | End-to-end pipeline |
| SSM | Operations Mgmt | Manage EC2 + on-prem at scale |
| OpsWorks | Config Mgmt | Chef / Puppet |