Skip to content

Why is my AMI or Amazon EBS snapshot creation slow or stuck in the pending state?

4 minute read
0

My Amazon Machine Images (AMIs) or Amazon Elastic Block Store (Amazon EBS) snapshots are slow or stuck in the pending state.

Resolution

Understand how changed blocks affect snapshot duration

The first snapshot of a volume is a full snapshot that contains all data blocks written to the volume after its creation. Subsequent snapshots are incremental and contain only the data blocks that changed since the last snapshot. Snapshots take longer to complete when they must process more changed blocks. The following scenarios increase snapshot duration:

  • No previous snapshots exist for write-intensive volumes that require a full snapshot with more blocks to copy.
  • A large number of blocks change between snapshots.

To reduce or prevent changed blocks, take the following actions:

  • Create snapshots frequently to reduce the number of changed blocks between subsequent snapshots.
  • Use Amazon Data Lifecycle Manager or AWS Backup to automate snapshot creation, retention, and deletion.
  • Set the snapshot frequency based on your Recovery Point Objective (RPO).

Note: You incur charges for Amazon EBS snapshots based on the incremental data saved in Amazon Simple Storage Service (Amazon S3), not the number of snapshots. For more information, see Amazon EBS pricing.

Troubleshoot AMI creation that's stuck at 0%

When you create an AMI backed by Amazon EBS, Amazon Elastic Compute Cloud (Amazon EC2) creates snapshots of all attached Amazon EBS volumes. The AMI creation progress depends on the progress of these underlying snapshots. If the snapshots don't start immediately, then the AMI progress remains at 0%.

AMI creation can remain at 0% because of the following reasons:

  • Your existing snapshots are already in progress for the same volume.
  • Heavy write activity or large and multiple attached volumes increase the data processed during snapshot creation.
  • You initiate multiple AMI or snapshot requests at the same time.
  • You reach your concurrent snapshot limits.

To troubleshoot AMI creation stuck at 0%, take the following actions.

Check the associated Amazon EBS snapshots

  1. Open the Amazon EC2 console.
  2. In the navigation pane, choose Snapshots.
  3. Search for snapshots with a description that includes the AMI ID.
    Note: If you deregister an AMI, then the AMI doesn't automatically delete the associated snapshots unless you explicitly choose to delete them. These snapshots can continue to consume time and resources until the creation process is complete.

If snapshots show pending at 0%, then the snapshots wait in queue to start copying data. If snapshot completion percentages advance slowly, then the AMI remains at 0% until at least one snapshot moves past 0%.

Wait for existing Amazon EBS snapshots to reach the completed state

Don't create multiple AMIs or snapshots for the same volume at the same time. Wait for existing snapshot operations to complete before you create a new AMI.

If multiple snapshots already copy data for the same volume, then Amazon EBS queues new snapshot requests. Wait for those snapshots to reach the completed state, and then create the AMI again.

Note: The AMI status doesn't move past 0% until at least one associated Amazon EBS snapshot starts to progress. Amazon EBS displays this behavior when it queues snapshots or waits for resources. Snapshot initialization can take time before progress is visible. If snapshots are in the pending state without errors, then the process typically proceeds automatically.

Understand multi-volume snapshots stuck at 99%

Snapshots at 99% require no action and complete automatically when all snapshots are ready.

Note: When you create simultaneous backups of multiple Amazon EBS volumes attached to an Amazon EC2 instance, the snapshots progress independently but complete their creation process together. The entire set remains at 99% until all snapshots are complete.

Avoid stacked snapshots

To avoid stacked snapshots, wait for current snapshots to reach the completed state before you create new ones.

Important: Don't create a new snapshot when snapshot creation is in progress.

Stacked snapshots occur when you create multiple snapshots for the same volume in a short time. The first snapshot starts creation, and then additional snapshots move to the pending state at 0%. The additional snapshots don't progress until the first snapshot completes its creation process.

Note: When you delete a pending snapshot, you don't stop the creation process. The snapshot completes its creation process before deletion.

Related information

Why does my Amazon EBS snapshot show no progress or shows the error, "ConcurrentSnapshotLimitExceeded"?

Archive Amazon EBS snapshots

AWS OFFICIALUpdated 3 months ago