aws delete instance ec2 code example
Example: delete instance from ec2
To terminate an instance
In the Amazon EC2 console, on the Instances page, locate your instance. Open the context (right-click) menu for the instance and choose Instance State, Terminate. Choose Yes, Terminate when prompted for confirmation. Amazon EC2 shuts down and terminates your instance.