Someone modified resources in the console; check what diverged from CloudFormation template.
→CloudFormation drift detection on the stack. Reports per-resource drift status with property-level diffs.
Reference↗
See exactly what CloudFormation will modify before applying a template change.
→Create a change set first; review proposed changes; execute only if safe. Change sets support nested stacks and cross-stack references.
Reference↗
Prevent accidental update to a critical resource (e.g. production RDS) inside a stack.
→CloudFormation stack policy — IAM-style document allowing or denying `Update:*` on specific logical resource IDs. Applied to the stack, separate from IAM.
Reference↗
Deploy the same baseline (e.g. CloudTrail, Config, GuardDuty) to all accounts in the org.
→CloudFormation StackSets with service-managed permissions + auto-deployment to new accounts in target OUs.
Reference↗
Run config + signal completion to CloudFormation from EC2 user-data.
→cfn-init (config), cfn-signal (signal CreationPolicy), cfn-hup (apply metadata changes). CreationPolicy makes the stack wait for the signal before marking CREATE_COMPLETE.
Reference↗
Auto-rollback stack if CloudWatch alarms fire after deploy.
→CloudFormation rollback configuration — list of CW alarms + monitoring time. If any alarm fires during the window, stack rolls back automatically.
Reference↗
Push a one-off shell command to 500 EC2 instances by tag.
→SSM Run Command with `AWS-RunShellScript` document, target by tag. No SSH. Logs to S3 / CloudWatch Logs.
Reference↗
Continuously enforce a config (e.g. CloudWatch agent installed) across all instances.
→SSM State Manager association — schedule + document + targets. SSM applies the desired state on schedule and reports compliance.
Reference↗
Apply OS patches to a fleet on a schedule with rollback safety.
→SSM Patch Manager — patch baseline (rules: severity, classification, approval delay) + patch group (tag) + maintenance window for the run.
Reference↗
SSH into private-subnet instance without bastion host or open inbound ports.
→SSM Session Manager — agent + IAM role open the session over the SSM Messages API. No public IP, no SSH key, full session logging.
Reference↗
Store DB connection string for app to fetch at runtime — no checked-in secrets.
→SSM Parameter Store SecureString (KMS-encrypted) or Secrets Manager (rotation). App calls `GetParameter` with IAM role.
Why: Parameter Store is free at standard tier; Secrets Manager has built-in rotation for RDS/DocumentDB/Redshift.
Reference↗
Auto-remediate compliance findings (e.g. open-to-world security group → restrict).
→SSM Automation runbook (custom YAML or AWS-owned). Triggered by EventBridge / Config / manual. Steps: branch, parallel, retry, abort.
Reference↗
Run patching only during 02:00–04:00 Sunday.
→SSM Maintenance Window — schedule (cron), targets, tasks. Wraps Run Command / Automation / Lambda / Step Functions invocations.
Reference↗
Build hardened Linux/Windows AMIs with pre-installed agents on a schedule.
→EC2 Image Builder — pipeline (image recipe + components + infra config + distribution). Output AMIs to multiple regions/accounts.
Reference↗
Deploy new app version to a small slice of EC2/ECS/Lambda before full rollout.
→CodeDeploy with canary or linear deployment configuration. Lambda canary `Lambda10Percent5Minutes` shifts traffic via alias weights.
Reference↗
Blue/green deploy on ASG behind ALB.
→CodeDeploy blue/green deployment group — provisions new ASG, registers with ALB target group, waits for health, swaps traffic, terminates old.
Reference↗
Pipeline in tooling account deploys to dev/stage/prod accounts.
→Cross-account CodePipeline — deploy stage uses cross-account role from target account. KMS key in tooling account shared with target.
Reference↗
Let dev teams self-serve approved infrastructure (e.g. VPC, S3 bucket) without giving full IAM.
→AWS Service Catalog — admin publishes products (CFN templates), users launch via IAM permission to launch the product role, not the underlying resources.
Reference↗
Enforce all resources have `Environment` and `CostCenter` tags org-wide.
→AWS Organizations tag policies. Define allowed tag keys + values; non-compliant tagging surfaced in Resource Groups Tag Editor + Config.
Reference↗
Migrating off OpsWorks Stacks (EOL May 2024).
→OpsWorks Stacks is end-of-life. Migrate to AWS Systems Manager + native Chef/Puppet on EC2, or convert to ECS/EKS, or rebuild via SSM Automation + CFN.
Pick between nested stacks and cross-stack references.
→Nested stacks: tightly coupled, lifecycle managed together (single update). Cross-stack `Export`/`ImportValue`: loosely coupled, independent lifecycles, exports immutable while imported.
Reference↗