How to terminate and clean up the environment
If you do not intend on keeping the VPC environment or would like to reduce costs by eliminating it and recreating it later, follow these simple steps:
- Go to
Services
, then CloudFormation to return to the CloudFormation stack list. - Delete the stacks one at a time, starting with the stack that has
BastionStack
in the name. To do this, click on the square to the left of the name to select the stack:
![](https://static.packt-cdn.com/products/9781787120730/graphics/B05911_04_31_CFDeleteBastionStackSelect.png)
- Click the
Actions
button, then selectDelete Stack
:
![](https://static.packt-cdn.com/products/9781787120730/graphics/B05911_04_32_CFBastionStackDeleteClick.png)
- Confirm the delete by clicking on the
Yes, Delete
button. This will delete the bastion instances and the associated security groups:
![](https://static.packt-cdn.com/products/9781787120730/graphics/B05911_04_33_CFBastionYesDeleteButton.png)
- The status of the stack will change to
DELETE_IN_PROGRESS
. When the deletion is complete, the stack will be removed from the list. You can click on therefresh
button (circular arrow) in the upper-right corner after a few minutes if you do not see a change:
![](https://static.packt-cdn.com/products/9781787120730/graphics/B05911_04_34_CFBastionStackDeleteInProgress.png)
- Repeat steps 2 through 5 for the stack with
VPCStack
in the name, then finally the remaining stacks with the name you...