I want to create an Amazon Machine Image (AMI) of my existing Amazon Elastic Compute Cloud (Amazon EC2) instance. I also want to launch an instance from the custom AMI. Or, I want to troubleshoot an EC2 instance that I launched from a custom AMI.
Resolution
Create a custom AMI from an existing instance
Prerequisites: (Windows instances only) Run System Preparation (Sysprep) to prepare the Windows installation for deployment across multiple instances. If you use EC2Launch to run Sysprep, then it's a best practice to update EC2Launch to the latest version. If you don't run Sysprep before you create the AMI, then your AMI might experience conflicts.
Create an AMI of the instance. To create an AMI of an instance with encrypted Amazon Elastic Block Store (Amazon EBS) snapshots, see How to create a custom AMI with encrypted Amazon EBS snapshots and share it with other AWS accounts and AWS Regions.
Launch an instance from a custom AMI
Launch your instance from the AMI.
Note: If you can't launch a specific instance type, then see Why are some instance types unavailable when I try to launch an Amazon EC2 instance from an AMI?
Share encrypted AMIs across accounts
To share an encrypted AMI, you must encrypt the AMI with a customer managed key. You can't directly share AMIs that you encrypted with an AWS managed key. Instead, you must copy the AMI, and then use a customer managed key to encrypt the new AMI.
To share encrypted AMIs across accounts, see How do I share encrypted AMIs or snapshots across accounts to launch encrypted Amazon EC2 instances?
To share AMI across Regions, see How do I create an Amazon EC2 instance AMI in one Region and then copy it to another Region? To export your AMI as a virtual machine (VM), see How do I use VM Import/Export to export an AMI of my Amazon EC2 instance as a VM?
Troubleshoot issues with instances that you launched from custom AMIs
If you experience connectivity issues, such as Remote Desktop Protocol (RDP) authentication errors, then check the following settings:
For more troubleshooting information, see the following resources:
Related information
Amazon Machine Images in Amazon EC2
How do I create an AMI that's based on my Amazon EBS–backed EC2 instance?