Archive for Amazon

Migrating AWS AMI from Europe region to US region

Login to S3 location of Europe.(using cockpit)
Created a bucket bucketname-us in US region (logged in Europe account)

[ec2europe@shivin ec2europe]$ ec2-migrate-image -C amazoncert/cert-.pem -K amazoncert/pk-.pem -o s3-key -w s3-key2 –bucket orginalbucket-eu –destination-bucket bucketname-us –manifest image.manifest.xml –location US -v
Setting User-Agent to [ec2-api-tools 1.3-36506]
Downloading manifest image.manifest.xml from orginalbucket-eu… OK
Reading parts from manifest.
Bucket bucketname-us already exists.
Guessing region by destination bucket: us-east-1
Guessing ACL from manifest: aws-exec-read
Uploading modified manifest image.manifest.xml… OK
Copying ‘image.part.00′ with acl aws-exec-read from ‘/orginalbucket-eu/image.part.00′ to ‘bucketname-us/image.part.00′… OK
Copying ‘image.part.01′ with acl aws-exec-read from ‘/orginalbucket-eu/image.part.01′ to ‘bucketname-us/image.part.01′… OK
Copying ‘image.part.02′ with acl aws-exec-read from ‘/orginalbucket-eu/image.part.02′ to ‘bucketname-us/image.part.02′… OK
Copying ‘image.part.03′ with acl aws-exec-read from ‘/orginalbucket-eu/image.part.03′ to ‘bucketname-us/image.part.03′… OK
Copying ‘image.part.04′ with acl aws-exec-read from ‘/orginalbucket-eu/image.part.04′ to ‘bucketname-us/image.part.04′… OK
Copying ‘image.part.05′ with acl aws-exec-read from ‘/orginalbucket-eu/image.part.05′ to ‘bucketname-us/image.part.05′… OK
Copying ‘image.part.06′ with acl aws-exec-read from ‘/orginalbucket-eu/image.part.06′ to ‘bucketname-us/image.part.06′… OK
………………….
………………….
Your new bundle is in S3 at the following location: bucketname-us/image.manifest.xml
[ec2europe@jk ec2europe]$
========================================================
Login to Europe gateway
Edit .bash_profile
#export EC2_URL=https://eu-west-1.ec2.amazonaws.com (Comment this line)
Logout and Login again
========================================================
[ec2europe@jk ~]$ ec2-register bucketname-us/image.manifest.xml
IMAGE ami-e2b1538b
[ec2europe@jk ~]$
========================================================
Then start the instance normally.
Note : USe the same key that we used in Europe region to login.