2개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Hi Sushant,
Yes you are correct. Copying an AMI within AZs ensures that compute and EBS volumes are preserved.
Have a read here fir confirmation: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html
If above helps, I would appreciate to be accepted as answer do that community can benefit for clarity, thanks!
0
Hello,
You can find the complete procedure to move an EC2 instance to another subnet, Availability Zone, or VPC documented in this Knowledge Center Article.
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전
Hello alatech,
Thanks a lot for quick response. I went through the documentation you shared above. I still have 1 query, does AWS copies all ebs volumes to the new AZ when we choose subnet from that AZ while deployment. (reason for asking is, time taken by AWS to deploy ec2 in same AZ and different AZ is same, how it is possible) Does that mean ebs volumes are stored as global service in s3. and only it creates pointers from different AZ's? Also, in AWS we do not get option to copy AMI to different AZ as we get option of moving it to another region. I tried to find above query on internet but could not get the answer. Answer to these queries will help me to understand how ebs, ami are maintained. Thanks in advance.
About your query have you gone through this? https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes.html, check Snapshots section.
From my knowledge, when copying AMI, it does not copy the ebs volume in new AZ, but it just references it from original.
Instead, during copying of ami, you can copy an EBS snapshot, which then you can use to create a volume in the target AZ. These snapshots can be used to create multiple new EBS volumes or move volumes across Availability Zones. Snapshots of encrypted EBS volumes are automatically encrypted.
When you create a new volume from a snapshot, it's an exact copy of the original volume at the time the snapshot was taken. EBS volumes that are created from encrypted snapshots are automatically encrypted. By optionally specifying a different Availability Zone, you can use this functionality to create a duplicate volume in that zone.
Hello Alatech, thanks again for the response. if we consider it creates only pointers and do not copy actual ebs volumes to new AZ, but now I can see that all new volumes are showing Availability Zone as "us-east-1c" ?
During the process of creating a new AMI from an EC2 instance, it explicitly says "During the image creation process, Amazon EC2 creates a snapshot of each of the above volumes.", where the above volumes refer to the currently attached to the EC2 instance (us-east-1b)
This snapshot is then used as a reference in the process of launching an EC2 from the generated AMI. In fact, in that part you will have to specify the target subnet (us-east-1c) where the new ec2 instance needs to be placed.
The end result will be that, because the Copy AMI brings an EBS snapshot with it, then that snapshot is used to create a new EBS Volume in the target subnet (us-east-1c).
Above steps are the same as outlined here: https://aws.amazon.com/premiumsupport/knowledge-center/move-ec2-instance/
Hope it helps and that answer can be accepted for clarity :) Thanks!