How you can recover or restore data from an Amazon Elastic Compute Cloud instance, that was terminated.
Image credit: AWS

How you can recover or restore data from an Amazon Elastic Compute Cloud instance, that was terminated.

As part of an Amazon EC2 instance termination, the data on any instance store volumes associated with that instance is deleted.?

By default, the root Amazon elastic block storage device is automatically deleted.?

So, it's not possible to recover either the original Amazon EC2 instance or any volumes that were deleted as part of the termination process. However, you can use multiple methods to recreate the terminated instance, we can launch a replacement EC2 instance, using?Amazon EBS snapshots?or?Amazon machine images?backups created from the terminated Amazon EC2 instance.?

For more information on how to launch a replacement instance, you can check the AWS EC2 documentation. Another method is to check whether the root volume of the terminated instance(s) is available in the EC2 console. So, we can attach this volume to another instance and further can access the data contained inside the root volume. For more information on how to attach an EBS volume to an EC two instance, you can check the AWS EC2 documentation.

For future planning, use the following methods to prevent instance termination and volume deletion:

  1. Enable termination protection of the EBS volume when you launch an EC2 instance. If you enable this option and the instance is later terminated, then the EBS root volume isn't deleted. You can then launch a new EC2 instance from the available root volume.?
  2. Set the shutdown behavior to stop the instance instead of terminating it.?
  3. If the instance is part of an Amazon EC2 Auto Scaling group, you can customize the termination policy or use scale-in-production.?
  4. In addition to regularly taking snapshots and AMIs to back up critical data, consider using termination protection to help prevent this issue in the future. You can also automate snapshots with?Amazon data lifecycle manager?and AWS backup.?

So now you know how you can recover or restore data from your terminated instance and also the steps that you can take to prevent your data from getting lost in case of accidental instance termination.

Helen Chukwukelu

Site Reliability Engineer | DevOps | Speaker | LinkedIn Learning Instructor | YouTuber | CKA | CKAD

2 年

Nice one Taiwo Amao

要查看或添加评论,请登录

社区洞察

其他会员也浏览了