An engineer deregisters an old, unused custom AMI to "clean up" and stop paying for it, but the next month's bill shows storage charges continuing for what turns out to be that AMI's underlying EBS snapshot. What explains this?
- This must be a billing error, since deregistering an AMI always deletes its underlying snapshots automatically
- Deregistering an AMI only removes the AMI's registration (so it can no longer be used to launch new instances); it does not, by default, delete the EBS snapshots that backed it, so those snapshots keep incurring storage charges until they are deleted separately
- The snapshot charges will stop automatically within 30 days as AWS's standard grace period for deregistered AMIs expires
- Deregistering an AMI only stops the snapshot charges if the AMI was shared with another account first
Why B? And why not the others?
Correct answer: B. Deregistering an AMI only removes the AMI's registration (so it can no longer be used to launch new instances); it does not, by default, delete the EBS snapshots that backed it, so those snapshots keep incurring storage charges until they are deleted separately
Deregistering an AMI removes its registration so it can no longer be used to launch new instances, but by default it has no effect on the EBS snapshots that were created to back that AMI (or on any S3 files backing an instance-store-backed AMI); those snapshots continue to exist and continue to incur standard storage charges until someone deletes them separately, which is exactly the surprise this engineer ran into. The option assuming this must be a billing error is wrong because this is expected, documented behavior, not a mistake. The option describing an automatic 30-day grace period invents a mechanism that doesn't exist; there's no time-based automatic snapshot deletion tied to deregistering an AMI. The option tying continued charges to whether the AMI was shared with another account is also wrong: whether snapshot deletion is automatic has nothing to do with sharing status; deleting the snapshot is always a separate, manual step regardless of whether the AMI was ever shared.
Source: AWS EC2 documentation: Deregister an Amazon EC2 AMI — snapshot retention behavior