Part 14: Delete the AWS resources
The app ships on its own now. Once you're done showing it off, take the cloud resources back down. 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 all disappear in one go.
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, that command no longer has the access to run. Delete the stack from the console instead.
- Open the CloudFormation console.
- Select the
snake-royalestack. - 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 detour from Part 12: Deploy to AWS with infrastructure as code, clean those up as well. Delete the render service and the Aiven Postgres so neither keeps running on a free trial.
With the resources cleaned up, the rest of the write-up looks at where to take the project next, starting in Next steps.