Cleanup the AWS Environment

If you are running in your own AWS environment, you may want to clean up after yourself.

If you are running this in a re:Invent or private workshop, you may have had an account pre-provisioned for you. You most likely can let the workshop owners de-provision the accounts for you.

Amplify Delete

Amplify can do a pretty good job of removing most of the cloud resources we’ve provisioned for this workshop (just by attempting to delete the CloudFormation nested stack it provisioned).

First, let’s cleanup the mobile and web applications: In a Terminal, type:

# change to the mobile app directory
cd ~/environment/andy-pizza-mobile
# let amplify delete the backend infrastructure
amplify delete

# change to the web app directory
cd ~/environment/andy-pizza-shop
# let amplify delete the backend infrastructure
amplify delete

Add Interactions

Remove S3 Buckets

amplify delete deletes most of the infrastructure created. But it plays it safe by not deleting Amazon S3 buckets where you might have stored additional files, such as in the hosting bucket. Should you not need them anymore, let’s delete these now. Head to the Amazon S3 Console and find your hosting bucket.

Add Interactions

Select the bucket checkbox, and click the Delete. You will need to enter the bucket name to confirm deletion.

Add Interactions

Confirm the bucket was removed.

Add Interactions

Terminate Cloud9

You can also terminate your Cloud9 Environment. Simply go to the Cloud9 Console, select the environment, and click the Delete button. Add Interactions

You will need to enter Delete to confirm that you want to delete the environment. Add Interactions

That does it for cleanup.