How do I troubleshoot the “Not authorized for image” error when I try to delete an Amazon EBS snapshot in Amazon EC2?

1 minute read
0

When I delete an Amazon Elastic Block Store (Amazon EBS) snapshot in my Amazon Elastic Compute Cloud (Amazon EC2) instance, I get the following error: “Failed to deregister the AMI ami-xxxxx. API error: "Not authorized for image:ami- xxxxx""

Resolution

The error message is received when you try to delete an EBS snapshot that is created by an Amazon Machine Image (AMI). When a snapshot is linked to an AMI, the AMI must be deregistered before the snapshot can be deleted.

To delete an EBS snapshot that's linked to an AMI, complete the following steps:

  1. Clean up your Amazon EBS-backed AMI.
  2. Delete the EBS snapshot.
AWS OFFICIAL
AWS OFFICIALUpdated 17 days ago