Skip to content

How do I view the progress of a newly created custom AMI of an Amazon EC2 instance that's stuck in the Pending state?

2 minute read
0

I want to view the progress of a custom Amazon Machine Image (AMI) of my Amazon Elastic Compute Cloud (EC2) instance that's stuck in Pending.

Short description

Custom AMI creation time depends on the number of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to the EC2 instance. If your snapshots have the Unavailable (99%) status, then there are still snapshots in creation. This is expected behavior. Snapshots change to the Available (100%) status after all other snapshots reach 99%. If an AMI is in the Pending state, then Amazon EC2 is still creating the associated snapshots. For more information, see Why is my AMI or EBS snapshot creation slow or stuck in the Pending state?

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

View the progress of your AMI creation

Complete the following steps:

  1. Open the Amazon EC2 console.
  2. In the navigation pane, choose Snapshots.
  3. Choose the Description filter. For Description contains, enter the AMI ID.

Or, run the following describe-images AWS CLI command to check the AMI status:

aws ec2 describe-images --image-ids ami-123456789

Note: Replace ami-123456789 with your AMI ID.

To view the status of the Amazon EBS snapshots, run the following describe-snapshots command:

aws ec2 describe-snapshots --filters "Name=description,Values=*ami-123456789*"

Note: Replace ami-123456789 with your AMI ID.

Create AMIs faster

Note: For data integrity purposes, it's a best practice to stop your instance before you create your AMI.

To create AMIs faster, manually create snapshots of your Amazon EBS volumes. Then, create an AMI from the manual snapshots. Also, create your AMIs during times when I/O is low.

Related information

Why is my incremental EBS snapshot taking the same time to create as a full EBS snapshot?

AWS OFFICIALUpdated 2 months ago