
- CloudFormation: define and provision foundational infrastructure (the car body).
- Systems Manager: install packages, run commands, patch, and perform ongoing configuration on running instances (install infotainment, set tire pressure, apply post-production fixes).
- AWS Config: audit, detect drift, and drive automated remediation when rules are violated.
- Maintain consistency across systems
- Scale configuration changes efficiently
- Automate repetitive tasks
- Detect and fix configuration drift (for example, manual changes)
- Enforce audit, security, and compliance requirements
Systems Manager is the primary AWS service for configuration management of running systems; use CloudFormation for provisioning and Systems Manager to evolve running infrastructure.

Example: run an ad-hoc shell script across instances using Run Command (CLI):

- OpsWorks historically provided Chef and Puppet-based configuration management and lifecycle hooks for server automation.
- This is included for historical completeness. OpsWorks is not a primary focus of modern AWS architectures or the current certification emphasis.
OpsWorks is a legacy configuration-management option. Prioritize Systems Manager and CloudFormation for modern AWS configuration management and exam preparation.
- CloudFormation is the canonical Infrastructure as Code (IaC) tool for provisioning AWS resources using templates stored in version control or S3.
- You can inject configuration at bootstrapping time (for example, EC2 user data that runs scripts or invokes configuration management tools). CloudFormation can also call Lambda-backed custom resources or integrate with configuration tools during creation.
- CloudFormation support for new AWS features can lag initial service launches; however, it remains the standard IaC approach for AWS resource provisioning.
- AWS Config records and evaluates resource configurations against managed or custom rules.
- It detects drift, logs historical configuration changes, and builds a searchable inventory of resources.
- While Config doesn’t directly mutate resources, it can trigger automated remediation workflows — for example, invoking a Systems Manager Automation document to fix an out-of-compliance resource (such as a security group that’s overly permissive).
- Use AWS Config for governance, compliance reporting, and forensic audits.

Additional guidance
- Use Parameter Store or Secrets Manager for secure configuration values; prefer
kms-encrypted Parameter Store entries for sensitive data if not using Secrets Manager. - Automate patching with Patch Manager and tie maintenance activities into Maintenance Windows and Change Manager when operating at scale.
- Integrate AWS Config with AWS Security Hub or your SIEM for centralized compliance reporting.
- AWS Systems Manager documentation: https://docs.aws.amazon.com/systems-manager/
- AWS CloudFormation documentation: https://docs.aws.amazon.com/cloudformation/
- AWS Config documentation: https://docs.aws.amazon.com/config/
- AWS security and governance patterns: https://docs.aws.amazon.com/whitepapers/