*** sop for amazon ec2 instance migration from one account(old) to another(new)
*** account number:
support -> support Center
0. [optional] scp data to digitalocean
1. create and share private AMI on the old account
[instance -> Actions -> create image ?, then register ?]
[
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html
* create a snapshot first
more efficient to create snapshots of your volumes prior to creating your AMI. This way, only small, incremental snapshots need to be created when the AMI is created, and the process completes more quickly
* create image
choose Instances and select your instance. Choose Actions, Image, and Create Image.
* register ami
]
[
To create an AMI from a snapshot using the console :
* Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
* In the navigation pane, under Elastic Block Store, choose Snapshots.
* Choose the snapshot and choose Actions, Create Image.
* In the Create Image from EBS Snapshot dialog box, complete the fields to create your AMI, then choose Create. If you're re-creating a parent instance, then choose the same options as the parent instance.
]
*** Both the AMI and the snapshot incur charges to your account until you delete them.
//=== SOP
1. create and share private AMI on the old account
2. find and copy the shared AMI on the new account
3. no need to restore ~/.ssh/authorized_keys [already recovered within the AMI]
4. elastic ip change and domain name update
allocate new elastic ip
assign elastic ip to the new instance
[on elastic ip dashboard -> actions -> associate address -> new instance id/tag]
5. restore security groups
6. release old elastic ip
7. release old ami/snapshot
[ in the old account, modify permission to remove the shared ami for the new account number;
deregister the ami
]
[ in the old account, modify permission for the snapshot;
delete the snapshot
delete the volume
]
8. delete key pairs
9. delete security groups
沒有留言:
張貼留言