DEV Community

Cover image for Day 14.Terminate EC2 Instance
Thu Kha Kyawe
Thu Kha Kyawe

Posted on

Day 14.Terminate EC2 Instance

Lab Information

During the migration process, several resources were created under the AWS account. Later on, some of these resources became obsolete as alternative solutions were implemented. Similarly, there is an instance that needs to be deleted as it is no longer in use.

1) Delete the ec2 instance named nautilus-ec2 present in us-east-1 region.

2) Before submitting your task, make sure instance is in terminated state.

Lab Solutions

Step-by-Step Instructions (AWS Console)

  1. Log in

Use your lab credentials and ensure the region is us-east-1.

  1. Locate the Instance

Open EC2 service.

Click Instances in the left menu.

Find the instance named nautilus-ec2.

  1. Check Termination Protection

To check:

Select nautilus-ec2

In the lower panel → Details

Look for: Termination protection: Enabled?

If enabled:

Click Actions → Instance settings → Change termination protection

Uncheck Enable termination protection

Save

  1. Terminate the Instance

Select the instance nautilus-ec2

Click Instance state → Terminate instance

Confirm termination

AWS will now shut down and delete the instance.

  1. Verify the Instance Reaches TERMINATED State

After a few seconds to minutes:

State changes:
running → stopping → stopped → shutting-down → terminated

Make sure the final state = terminated before submitting.

Refresh the page if needed.


Resources & Next Steps

Credits
  • All labs are from: KodeKloud
  • Thanks for providing them.

Top comments (0)