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:

  1. Go to Services, then CloudFormation to return to the CloudFormation stack list.
  2. 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:
  1. Click the Actions button, then select Delete Stack:
  1. Confirm the delete by clicking on the Yes, Delete button. This will delete the bastion instances and the associated security groups:
  1. 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 the refresh button (circular arrow) in the upper-right corner after a few minutes if you do not see a change:
  1. Repeat steps 2 through 5 for the stack with VPCStack in the name, then finally the remaining stacks with the name you gave them when creating them (IOTAnalyticsVPC for this walk-through).
  1. The NAT gateways and the bastion hosts are the larger cost items in the environment. Verify that the NAT gateways have been deleted by going to Services, then VPC. The NAT gateway count may not be zero on the dashboard and can still show a count of two for several hours before being removed from the list. Click on NAT Gateways in the dashboard to go to the list of gateways:
  1. You should see both with a status of Deleted:
  1. Verify that the bastion hosts have been deleted by going to Services, then EC2. The EC2 Dashboard should have a count of 0 Running Instances. You can click on the Running Instances link to go to the EC2 list. The Linux bastion instances should either have a status of terminated or not be listed at all. If you are checking shortly after deleting the stacks, the instances will most likely still be visible in the list. As long as the status is terminated, you will not be charged:
  1. When recreating the environment, you will not need to recreate the key pair or the S3 bucket. Since the key pair and the S3 bucket were not part of the CloudFormation stack, it will remain in your environment after all the stacks are deleted. There is no charge for these unless you have data in the S3 bucket; even then, the costs are very low.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.190.93