DEV Community

Shivendu Amale
Shivendu Amale

Posted on

1 1 1

Data persistence for Amazon EC2 instance store volumes

  • Instance store volumes are attached only at instance launch. They cannot be detached from one instance to another nor attach the instance after the launch.
  • The data on the instance store persists on reboot of the instance but the data is erased when the instance is stopped, hibernated, terminated.
  • Here are key events that affect data persistence in the instance store to considered to how data behaves in the instance store:
Event Data condition
Instance Type changed Does not persist
EBS backed AMI is created from the instance Does not persist
Instance store backed AMI is created from the instance Persist. Stored in S3. More information below
OS shutdown event Does not persist
OS restart Persist
Scheduled Instance Stop Does not persist
Scheduled Instance Reboot Persist
System Reboot Persist
Instance Retirement Does not persist
Simplified automatic recovery Does not persist
CloudWatch action based recovery Does not persist
Disk Failure Data on the failed disk does not persist
Power failure Persist. On reboot
Host failure Does not persist
  • When creating an instance store-backed AMI, the instance store data is saved in S3. When a new instance is launched from this AMI, the stored data is restored to the instance store.
  • In an Auto Scaling Group, if an instance fails a health check and is replaced, the new instance does not retain any data from the previous instance.

More to read:

Connect with me on LinkedIn!

Disclaimer: This article is written by me. I have used ChatGPT for markdown formatting. The contents of the articles were not changed. I would really appreciate your feedback.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post