Chaos Engineering

Conclusion

Cleanup Process

After completing the workshop, it’s important to remove all AWS resources to prevent unexpected charges. Follow these steps in sequence:

StepResource TypeAction
1Amazon S3 BucketsEmpty buckets before deletion
2Amazon RDS SnapshotsDelete manual Aurora snapshots
3AWS CDK StacksRun cdk destroy for all CDK-managed resources
4Auto Scaling Group & Launch TemplateDelete the group and associated launch template
5CloudWatch Log GroupsDelete the log group in CloudWatch

1. Empty Amazon S3 Buckets

Before tearing down your CloudFormation stacks or CDK apps, you must empty every S3 bucket. AWS will not delete buckets that contain objects.

The image shows an Amazon S3 console with a list of general-purpose buckets, displaying their names, AWS regions, IAM access analyzers, and creation dates.

Warning

Buckets with existing objects will block stack deletion. Ensure all objects are removed first.

  1. Open the Amazon S3 console.
  2. Select each workshop bucket.
  3. Click Empty.
  4. Type permanently delete and confirm.

The image shows an AWS S3 console screen where a user is prompted to confirm the permanent deletion of all objects in a bucket by typing "permanently delete."

Repeat for all seven buckets.

2. Delete RDS Snapshots

Remove any manual snapshots of your Aurora database. Retained snapshots prevent the CloudFormation stack from deleting the database instances.

The image shows the Amazon RDS console, specifically the "Snapshots" section, where manual snapshots are listed and can be managed.

  1. Go to the Amazon RDS console.
  2. Choose Snapshots in the navigation pane.
  3. Select each manual snapshot and delete.

Note

Automated snapshots created by RDS are cleaned up when you delete the database instance.

3. Destroy CDK Stacks

With buckets and snapshots removed, destroy your CDK-managed stacks:

cd ~/environment/workshopfiles/fis-workshop/intro-experiment/cdk
cdk destroy --all \
  --context admin_role_arn=$KS_ADMIN_ARN \
  --context dashboard_role_arn=$CONSOLE_ROLE_ARN \
  --require-approval never

When prompted, type y to confirm. For more details, see the AWS CDK CLI Reference.

4. Remove Manual Auto Scaling Resources

If you created an Auto Scaling group and launch template manually, delete them now.

  1. Navigate to the Auto Scaling Groups console.
  2. Select the group (e.g., in the Tokyo region).
  3. Click Delete, then type delete to confirm.

The image shows a confirmation dialog in the AWS console for deleting an Auto Scaling group, warning that this action will terminate all instances in the group. The user is prompted to type "delete" to confirm the action.

  1. Finally, delete the associated launch template to terminate any remaining EC2 instances.

5. Delete CloudWatch Log Group

Remove the CloudWatch Logs group created during the workshop.

  1. Open the CloudWatch console.
  2. Click Log groups.
  3. Select your log group, then choose Actions → Delete log group.

The image shows an AWS CloudWatch interface with a dropdown menu under "Actions" for managing log groups, including options like deleting log groups and creating metric filters.

With these steps complete, all workshop resources are cleaned up.

References

Watch Video

Watch video content

Previous
Running the Experiment