Part 14: Delete the AWS resources

The app deploys on its own now. Once you no longer need it, delete the cloud resources. The AWS stack is the only part of this workshop that costs money.

Delete the stack

Everything we provisioned lives in one CloudFormation stack. When you delete that stack, the EC2 instance, the Aurora database, and the secrets are all deleted together.

From the CLI that's one command:

aws cloudformation delete-stack --stack-name snake-royale

Delete it from the console

If you already revoked the admin key in Part 13: CI/CD with GitHub Actions, the CLI no longer has permission to run that command. Delete the stack from the console instead.

  • Open the CloudFormation console.
  • Select the snake-royale stack.
  • Choose Delete and confirm.

This does the same thing as the CLI. The deletion takes a few minutes, again mostly the Aurora part.

Confirm nothing is left

When the stack is gone, nothing keeps costing money. Still, open the console and check that the EC2 instance and the Aurora cluster are both deleted.

If you made an IAM user for the deploy and no longer need it, delete that too, along with its access key.

If you tried the managed host from Part 12: Deploy to AWS with infrastructure as code, delete the render service and the Aiven Postgres too, so neither keeps running on a free trial.

Next, we look at where to take the project in Next steps.

Questions & Answers

Sign up to ask questions, track your progress, and get access to other workshops · Already have an account? Sign in