After completing the course, it's a good idea to clean up all the resources you have created to avoid unnecessary spendings.
- Removing CDK Deployments from All Repos
- Remove RDS via Console
- Remove DynamoDB via Console
- Clean and Delete S3 Buckets
- Ensure CloudFormation is Clean
- Remove All LogGroups from CloudWatch
- Check if Lambda, EC2, CloudFront, SNS, SQS, API Gateway, and EBS Pages are Empty
- Navigate to the directories of your CDK stacks.
- Run the following command to destroy the stack:
cdk destroy --all
- Confirm the destruction when prompted.
Repeat these steps for each CDK project repository.
- Open the Amazon RDS Console.
- In the navigation pane, choose Databases.
- Select the database instance you want to delete.
- Choose Actions and then Delete.
- Remove the checkbox from Final backup creation.
- Follow the prompts to delete the database instance.
- Open the Amazon DynamoDB Console.
- In the navigation pane, choose Tables.
- Select the table you want to delete.
- Choose Actions and then Delete Table.
- Confirm the deletion.
- Open the Amazon S3 Console.
- Select the bucket you want to delete.
- Empty the bucket by deleting all objects and folders within it.
- Once the bucket is empty, select the bucket again.
- Choose Delete bucket and confirm the deletion.
- Open the AWS CloudFormation Console.
- In the navigation pane, choose Stacks.
- Review the list of stacks. If there are any stacks you no longer need, select them.
- Choose Delete and confirm the deletion.
- Open the Amazon CloudWatch Console.
- In the navigation pane, choose Log groups.
- Select the log groups you want to delete.
- Choose Actions and then Delete log group(s).
- Confirm the deletion.
-
Lambda:
- Open the AWS Lambda Console.
- Ensure there are no functions listed. If there are, delete them.
-
EC2:
- Open the Amazon EC2 Console.
- Ensure there are no running instances, volumes, or other resources. Terminate any that are still active.
-
CloudFront:
- Open the Amazon CloudFront Console.
- Ensure there are no distributions. If there are, disable and delete them.
-
SNS:
- Open the Amazon SNS Console.
- Ensure there are no topics or subscriptions. Delete any that exist.
-
SQS:
- Open the Amazon SQS Console.
- Ensure there are no queues. Delete any that exist.
-
API Gateway:
- Open the Amazon API Gateway Console.
- Ensure there are no APIs. Delete any that exist.
-
EBS:
- Open the Amazon EC2 Console.
- In the navigation pane, choose Elastic Block Store > Volumes.
- Ensure there are no volumes. Delete any that exist.