Migrating EC2 image

Posted under » AWS on 4 April 2022

To migrate an EC2 instance to another AWS account is surprisingly a complex process.

I initially assume you just need to stop your instance and then move them to a new home but there is no such option. AWS requires us to create an AMI (AWS machine Image). I tried to directly create one but was faced with a "Volumes size for volumes must be between and". There is an error in the error text itself.

After many tries, I did not declare most things but just the name (Lion) and description of the AMI. It worked and I was able to create an image.

It is still a private image but I need to share this AMI to another account. So I share it using the other AWS account ID. When I go to the other account, I go to the EC2 AMI panel. I look for the AMI under private images and I saw it (Lion) there. I was then able to launch the EC2 after making the SSD size larger than what I had before.

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS