A budget alert fired at 120% of forecast mid-month. How do you find what is spending money?
IntermediateTroubleshootingCloudFormation, CloudWatch, KMS, Secrets and Cost
Answer
Likely causes → A new or forgotten resource (a big instance, a GPU node pool, a NAT), runaway usage (Lambda loop, logs ingestion), or a missing commitment discount.
Diagnose →
aws ce get-cost-and-usage --time-period Start=2026-11-01,End=2026-11-09 --granularity DAILY \
--metrics UnblendedCost --group-by Type=DIMENSION,Key=SERVICE \
--query 'ResultsByTime[-1].Groups | sort_by(@,&to_number(Metrics.UnblendedCost.Amount))[-5:]'
aws ce get-cost-and-usage --time-period Start=2026-11-01,End=2026-11-09 --granularity DAILY \
--metrics UnblendedCost --group-by Type=DIMENSION,Key=LINKED_ACCOUNT
aws ce get-anomalies --date-interval StartDate=2026-11-01,EndDate=2026-11-09
Fix →
- Drill down from service to usage type, then account, then tag (
Type=TAG,Key=team) - Stop or right-size the offender
- Fix the runaway trigger
Prevent → Turn on Cost Anomaly Detection with alerts to a channel, use per-team budgets with actions, and enforce cost allocation tags.
More on CloudFormation, CloudWatch, KMS, Secrets and Cost
Updating a stack fails: `Stack:arn:aws:cloudformation:...:stack/app/... is in ROLLBACK_COMPLETE state and can not be updated.`BeginnerA stack is stuck in `UPDATE_ROLLBACK_FAILED`.AdvancedA pipeline fails with `An error occurred (ValidationError) when calling the UpdateStack operation: No updates are to be performed.`Beginner`InsufficientCapabilitiesException: Requires capabilities : [CAPABILITY_NAMED_IAM]`.BeginnerStack deletion ends in `DELETE_FAILED` with `The bucket you tried to delete is not empty` on an S3 bucket resource.IntermediateDrift detection shows `MODIFIED` on a security group and an RDS instance that someone changed in the console. How do you reconcile?Advanced