Beginner 12 min read

Cleaning Up: Terminating EC2 Resources Safely

By the end of this lesson, you'll be able to:

  • Work through a complete cleanup checklist for a training EC2 project
  • Explain why terminating the instance alone may not be enough to remove every related resource
  • Verify cleanup rather than assuming it happened automatically

Prerequisites: "Project: Launch a Simple Web Server on EC2"

Why this lesson exists on its own

Every earlier lesson in this module flagged a resource with its own independent cost story: the instance itself, its EBS volumes, and any Elastic IP allocated for it. Terminating an instance is the single biggest cleanup step, but treating it as the only step is exactly the assumption Lesson 6 warned against. This lesson is a deliberate, standalone checklist — because "I think I cleaned up" and "I verified I cleaned up" are different levels of confidence, and only one of them is good enough for something that costs real money.

The cleanup checklist

  1. Confirm you no longer need the instance. Have you finished what you set out to learn or build? Is there anything on it you meant to save first?
  2. Terminate the training instance. Not stop — terminate, per Lesson 6's distinction, if you're genuinely done with it.
  3. Check attached EBS volumes. Depending on how the instance was configured, its root volume may or may not be automatically deleted on termination — check whether any volumes remain and delete the ones you no longer need.
  4. Check allocated networking resources. If you allocated an Elastic IP for this project, releasing it once it's no longer attached to anything avoids leaving an unused resource behind.
  5. Confirm nothing training-related remains. Look through your accountʼs EC2 dashboard once more — instances, volumes, and addresses — rather than trusting memory alone.

Verify, don't assume

The single most important habit this lesson can leave you with: after cleanup, look. Open the relevant AWS Console pages (instances, volumes, addresses) and confirm directly that nothing training-related remains, rather than assuming termination handled everything. This habit scales — every future module's hands-on projects will ask you to apply the exact same discipline to whatever new resource type that module introduces.

Exercise

A learner terminates their training EC2 instance and considers the project fully cleaned up. Using this lesson's checklist, name two other resources they should specifically check before agreeing that nothing is left over.

Show hint

Both resources were introduced earlier in this module, each with its own independent cost story.

Cleaning Up: Terminating EC2 Resources Safely Quiz

1. A learner terminates their training EC2 instance and stops there, assuming everything related to it is now gone. What does this lesson say is missing from that approach?

2. Verifying cleanup by checking the AWS Console directly is a more reliable habit than assuming termination handled everything.

Log in to submit the quiz and save your score.

My Notes

Log in to keep private notes on this lesson.

Questions about this lesson

No questions yet — be the first to ask.

Log in to ask a question about this lesson.

Summary

Finishing a hands-on EC2 project safely means more than terminating the instance — it means deliberately checking every related resource this module introduced, since AWS does not automatically assume you want everything connected to an instance removed just because the instance itself is gone.