You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cloud custodian error;
custodian.actions:ERROR Exception deleting snapshot set
AWS Error from Cloud Trail Logs;
eventSource:ec2.amazonaws.com
eventName:DeleteSnapshot
errorCode:Client.InvalidSnapshot.InUse
errorMessage:The snapshot snap-* is currently in use by ami-*, including some disabled AMIs.
requestParameters:{"snapshotId":"snap-*","force":false}
Extra information or context
The describe_images API in boto3 has a filter to include deprecated and disabled AMIs in the response. This defaults to false, so I assume that when Cloud Custodian is pulling the snapshots used by AMIs the filter is not being set to true and disabled and deprecated AMIs and their snapshots are not being included in the unused filter.
The text was updated successfully, but these errors were encountered:
Describe the bug
When using the unused filter set to true for EBS Snapshots we get an error deleting snapshots as they are still in use by a disabled AMI.
What did you expect to happen?
I expected that setting the unused filter to true would exclude all used snapshots.
Cloud Provider
Amazon Web Services (AWS)
Cloud Custodian version and dependency information
Policy
policies: - name: ebs-snapshot-expiration resource: ebs-snapshot filters: - type: unused value: true - type: age days: 90 op: ge actions: - type: delete
Relevant log/traceback output
Extra information or context
The describe_images API in boto3 has a filter to include deprecated and disabled AMIs in the response. This defaults to false, so I assume that when Cloud Custodian is pulling the snapshots used by AMIs the filter is not being set to true and disabled and deprecated AMIs and their snapshots are not being included in the unused filter.
The text was updated successfully, but these errors were encountered: