Lab 6: Deleting Created Resources

Lab 6: Deleting Created Resources

·

1 min read

Lab Objective

  • Tear down evidence-app resources using destroy.sh

  • (Optional) Reset CloudShell home directory contents

Challenge 1: Teardown Resources

Log back into your CloudShell session and use destroy.sh to destroy the deployed resources

  • On your CloudShell, run the command
/home/cloudshell-user/building-detections-aws/scripts/destroy.sh

Confirm Resource Deletion

  • Navigate to your CloudTrail Event History and view Events

Challenge 2: (Optional) Reset CloudShell Home Directory

  • In your CloudShell session, click on the Actions dropdown and choose Delete AWS CloudShell home directory.

  • When prompted, typedelete in the text field and click on the Delete button.

After doing the above steps, your CloudShell session will restart, and the home directory will be set to default.

  • Navigate to AWS Key Management Service (KMS), Under Customer Managed Keys, select the KMS alias that was created earlier in this lab and select “Schedule key deletion” from the “Key actions” menu.

  • On Schedule key deletion, enter Waiting period days as (7). Scroll down, check the confirmation box, and click on the Schedule deletion button.

  • Navigate to CloudTrail → Trails and delete the Security Tails created in this lab. Click on the Delete button.

  • On the pop-up window, click on the Delete button.