In this step, we will clean up all resources, we created during this lab, so that no further cost will occur.
In your Cloud9 IDE, run the following command to delete the resources we created with our AWS SAM template:
cd ~/environment/wild-rydes-async-messaging/lab-3
aws cloudformation delete-stack \
--stack-name wild-rydes-async-msg-3
Run the following command to delete all the log groups associated with the labs.
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output table | awk '{print $2}' | \
grep ^/aws/lambda/wild-ryde | while read x; \
do echo "deleting $x" ; aws logs delete-log-group --log-group-name $x; \
done
You can delete the S3 bucket by going to the console or using the CLI. Please follow one of the options below to delete the bucket.
In your Amazon S3 console, filter for the bucket you have created to upload your code artifacts with AWS SAM, select the bucket and click the Delete button in the top.
You are done!
In your Cloud9 IDE, run the following command to delete the Amazon S3 bucket we created earlier:
aws s3 rb s3://${BUCKET_NAME} —-force
You are done!