Learn which AWS storage option to choose when you need to retain data after an EC2 instance is deleted. Discover the benefits of using Amazon Elastic Block Store (EBS) over EC2 Instance Store for persistent data storage.
Table of Contents
Question
A developer wants to retain data after an instance is deleted. Which storage option should they choose?
A. AWS Identity and Access Management (IAM) roles
B. Amazon EC2 Instance Store
C. AWS Lambda
D. Amazon Elastic Block Store (Amazon EBS)
Answer
D. Amazon Elastic Block Store (Amazon EBS)
Explanation
Amazon EBS is persistent storage. It can be retained after the instance is terminated. Instance store volumes are ephemeral. They can only be rebooted and still retain data. If instances with instance store volumes are stopped or terminated, the user will lose all the data on the volume.
When an Amazon EC2 instance is terminated, any data stored on the instance’s local storage (Instance Store) is lost permanently. Instance Store volumes are ephemeral, meaning the data only persists during the lifetime of the instance.
To retain data after an instance is deleted, you should use Amazon Elastic Block Store (EBS). EBS provides persistent block-level storage volumes that can be attached to EC2 instances. The data stored on EBS volumes persists independently from the instance’s lifecycle. Even if you terminate the instance, the data on the EBS volume remains intact and can be attached to another instance later.
Here’s why the other options are incorrect:
A. AWS Identity and Access Management (IAM) roles are used for granting permissions to AWS services and users, not for data storage.
B. Amazon EC2 Instance Store provides temporary block-level storage that is physically attached to the host computer running the instance. Data on Instance Store volumes is lost when the instance is stopped or terminated.
C. AWS Lambda is a serverless compute service for running code without provisioning or managing servers. It is not designed for persistent data storage.
In summary, to ensure data is retained after an EC2 instance is deleted, use Amazon EBS for persistent block-level storage. EBS volumes can be detached from a terminated instance and attached to a new one, preserving your data.
Getting Started with Compute EDCOMPv1EN-US assessment question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Getting Started with Compute EDCOMPv1EN-US assessment and earn Getting Started with Compute EDCOMPv1EN-US badge.