Automation & Configuration Management
In the AWS ecosystem, automation is the practice of using code to define, deploy, and manage infrastructure and applications. Configuration management ensures that these resources maintain a desired state over time, eliminating “configuration drift” and manual errors.
Core Concepts & Well-Architected Framework
Automation aligns primarily with the Operational Excellence and Cost Optimization pillars of the AWS Well-Architected Framework.
- Infrastructure as Code (IaC): Treat your infrastructure the same way you treat application code—version controlled and peer-reviewed.
- Idempotency: The ability to run an automation script multiple times without changing the result beyond the initial application.
- Self-Healing: Using automation to detect failures and launch replacement resources without human intervention.
Service Comparison Table
| Feature | AWS CloudFormation | AWS OpsWorks | AWS Elastic Beanstalk |
|---|---|---|---|
| Primary Use | Infrastructure as Code (IaC) | Configuration Management (Chef/Puppet) | Platform as a Service (PaaS) |
| Control Level | Full control over all AWS resources | OS-level configuration & App lifecycle | High-level abstraction (focus on code) |
| Learning Curve | Moderate (JSON/YAML) | High (Requires Chef/Puppet knowledge) | Low (Upload code and go) |
| Cost | Free (Pay for resources created) | Free (Pay for resources + OpsWorks fee) | Free (Pay for resources created) |
Scenario-Based Learning: Decision Matrix
THEN use AWS OpsWorks.
THEN use AWS Elastic Beanstalk.
THEN use AWS CloudFormation.
THEN use AWS Systems Manager (SSM) Run Command.
Exam Tips: Golden Nuggets
- CloudFormation Drift: Know that CloudFormation can detect if manual changes were made to resources outside of the stack template.
- SSM Parameter Store vs. Secrets Manager: Use Parameter Store for general config and Secrets Manager for secrets requiring rotation (like RDS passwords).
- WaitConditions: In CloudFormation, use
WaitConditionto pause stack creation until an external signal (like a script finishing) is received. - OpsWorks Stacks: If the exam mentions “Layers,” “Recipes,” or “Cookbooks,” the answer is almost certainly OpsWorks.
Automation Workflow Visualized
Key Services
SSM: Patching, inventory, and remote shell access without SSH keys.
CloudFormation: Declarative IaC for entire architectures.
Common Pitfalls
Manual Changes: Updates made in the Console cause “Drift” and break automation.
Hardcoding: Avoid hardcoding IDs; use Parameters and Mappings instead.
Quick Patterns
Blue/Green: Deploy a new stack (Green) and flip Route 53 to migrate users.
StackSets: Use to deploy CloudFormation stacks across multiple Accounts/Regions.