In this final step, we will clean up all AWS resources created during this workshop to avoid ongoing charges.
Make sure to follow these steps in order to completely remove all resources and avoid unexpected charges.
First, we need to terminate the EMR cluster as it’s the most expensive resource.

Change your region to where you save EMR Cluster


Wait for the EMR cluster to fully terminate before proceeding to the next step.
Go to VPC Console
Mine is vpc-0c17b843293d26a07 but your VPC may look different

Use AWS CDK to destroy all the stacks we created:
cdk destroy EMRClusterStack

cdk destroy BucketDeploymentStack

cdk destroy SecurityStack

Type ‘y’ when prompted to confirm each stack deletion.

emr-pipeline-[your-nanoid]emr-logs-[your-nanoid]cdk-hnb659fds-assets-[account-id]-[region]
Make sure to empty the buckets before deleting them.

EMR_EC2_DefaultRoleEMR_DefaultRole

Check the following AWS services to ensure no resources remain:
Don’t worry, your cost it’s not gonna be this high. This is because i have left the project a few days so it charge me that much.

It may take up to 24 hours for all charges to stop appearing in your billing dashboard.
For quick reference, here are all the cleanup commands:
# Destroy CDK stacks
cdk destroy EMRClusterStack
cdk destroy BucketDeploymentStack
cdk destroy SecurityStack
# Verify stack deletion
aws cloudformation list-stacks --stack-status-filter DELETE_COMPLETE
# List remaining S3 buckets
aws s3 ls
Congratulations! You have successfully completed the workshop and cleaned up all AWS resources. Your AWS account should no longer incur charges from this project.
If you encounter issues during cleanup:
