How do I delete or terminate my Amazon EC2 resources?
I want to find all resources associated with the Amazon Elastic Compute Cloud (Amazon EC2) service and delete them.
"I want to find all resources associated with the Amazon Elastic Compute Cloud (Amazon EC2) service and delete them.Short descriptionAmazon EC2 resources fall under a few general billing categories. To stop accruing charges:Identify your active EC2 resources in all AWS Regions.Terminate (delete) all EC2 instances and related resources in all Regions.ResolutionIdentify active resources in your AWS accountTo see your active resources and the Regions where they are provisioned, check your monthly bill in the Billing and Cost Management console.Use the AWSSupport-ListEC2Resources AWS Systems Manager Automation document to list your active EC2 resources. This automation document returns information on EC2 instances and related resources, such as Amazon Elastic Block Store (Amazon EBS) volumes, Elastic IP addresses, and Amazon EC2 Auto Scaling groups from the AWS Regions that you specify. By default, the information is gathered from all Regions and displayed in the output. To run this automation, follow the instructions in Running a simple automation.Delete or terminate EC2 resourcesTo terminate (delete) all your active resources, do the following in the respective Regions:Note: Deleted, terminated, or released resources can't be recovered.Stop or terminate all your EC2 instances and load balancers. Note: EC2 instances are visible in the console for a short time after they're terminated. You aren't billed for any instances that aren't in the running stateDelete your Auto Scaling infrastructure.Release all Dedicated Hosts.Delete all EBS volumes and EBS snapshots.Release all Elastic IP addresses.Deregister all Amazon Machine Images (AMIs).Terminate all Elastic Beanstalk environments.You can check the AWS Cost and Usage Report or AWS Cost Explorer to confirm that the resources are no longer generating charges.Note: Reserved Instances are billed as a flat fee each month. Instead, the fee is determined by the contract that you agreed to when you activated the Reserved Instance. Reserved Instances can't be canceled, but if you have a US bank account, you can list them for sale on the Reserved Instance Marketplace.The following EC2-related resources don't generate charges when used or provisioned to an account:Virtual private clouds (VPCs)Security groupsKey pairsElastic network interfacesAuto Scaling groupsNote: Amazon Lightsail and EC2 are separate services and are billed separately. For more information about Lightsail, see Lightsail docs.Related informationWhy am I charged for Amazon EC2 when all my instances were terminated?Why can't I find an Amazon EC2 instance that I launched on my account?What do I do if I'm receiving a bill from AWS, but can't find the resources related to the charges?Why am I being billed for Elastic IP addresses when all my Amazon EC2 instances are terminated?I unintentionally incurred charges while using the Free Tier. How do I make sure that I'm not billed again?Follow"