Cleaning upAlpha

Cleaning up resources created

That's it! You now have a fully working infrastructure defined in two environments: dev and prod.

You and your teammates could also use sandboxes to test their modifications without fearing of breaking anything.

The AWS resources that you created in this tutorial can incur ongoing costs. To avoid such costs, you will need to delete the created environments and sandboxes.

Deleting sandboxes

Before deleting an environment, all associated sandboxes must be removed. To delete a sandbox, you first need to destroy the resources created on your AWS account(s):

$ scaffold destroy dev --sandbox
$ scaffold destroy prod --sandbox

Once removed, you could delete your sandboxes using the sandbox:delete command:

$ scaffold sandbox:delete dev
$ scaffold sandbox:delete prod

Deleting environments

Now that your sandboxes have been deleted, you can delete your infrastructure environments. To do this, you first need to destroy the resources created on your AWS account(s):

$ scaffold destroy dev
$ scaffold destroy prod

Once removed, you could delete your environments using the env:delete command:

$ scaffold env:delete dev
$ scaffold env:delete prod