EC2 stop and start

Topic: Cloud aws core

Summary

Stop an EC2 instance to save cost; EBS is kept. Start again; public IP usually changes unless Elastic IP. Use when saving cost or pausing workloads.

Intent: How-to

Quick answer

  • Stop from console or CLI. EBS retained. Start allocates new compute; new public IP unless Elastic IP.
  • Instance store is lost on stop for instance-store-backed. Attach Elastic IP to keep same public IP.
  • Use for dev or non-24/7. Schedule stop/start with Lambda for cost savings.

Prerequisites

Steps

  1. Stop

    Stop instance from EC2 or CLI. EBS volumes remain.

  2. Start

    Start instance. New public IP unless Elastic IP. Verify app.

  3. Elastic IP

    Attach Elastic IP before stop to keep same public IP after start.

Summary

Stop to save cost; start to run again. Use Elastic IP for same public IP.

Prerequisites

Steps

Step 1: Stop

Stop instance. EBS remains.

Step 2: Start

Start instance. Check IP and app.

Step 3: Elastic IP

Attach Elastic IP to keep same public IP.

Verification

  • Instance stops and starts; data intact.

Troubleshooting

Lost IP — Attach Elastic IP before stop. Instance store — Data lost on stop.

Next steps

Continue to