Cleanup

Cleanup

ℹ️ Information: This section guides you through cleaning up the resources created during the VPC Peering lab to avoid incurring unnecessary costs.

💡 Pro Tip: Always clean up resources after completing a lab to avoid unexpected charges. Use AWS CloudFormation to automate the cleanup process.

Implementation Steps

  1. Access VPC Management Console
    • Select VPCs from the left sidebar
    • Select My VPC

VPC Console

  1. Delete VPC Peering Connection
    • Select Peering Connections
    • Select the peering connection
    • Click Actions and select Delete Peering Connection
    • Confirm the deletion

Delete Peering Connection

  1. Terminate EC2 Instances
    • Access the EC2 Management Console
    • Select the instances created for the lab
    • Click Actions and select Instance State > Terminate
    • Confirm the termination

Terminate EC2 Instances

  1. Delete Security Groups
    • Select Security Groups
    • Select the security groups created for the lab
    • Click Actions and select Delete Security Group
    • Confirm the deletion

Delete Security Groups

  1. Delete VPCs
    • Select VPCs
    • Select the VPCs created for the lab
    • Click Actions and select Delete VPC
    • Confirm the deletion

Delete VPCs

🔒 Security Note: Ensure that all resources are properly deleted to prevent unauthorized access or data exposure.

⚠️ Warning: Deleting a VPC will also delete all associated resources, such as subnets, route tables, and network ACLs. Ensure you have backed up any necessary data before deletion.

💡 Pro Tip: Consider using AWS CloudFormation to manage your infrastructure as code, making it easier to create and delete resources in a controlled manner.