diff --git a/cloudimg/aws.py b/cloudimg/aws.py index 6271520..3d499d4 100644 --- a/cloudimg/aws.py +++ b/cloudimg/aws.py @@ -372,6 +372,12 @@ def get_snapshot_by_name(self, name): if not snapshots: return None + elif len(snapshots) > 1: + snaps = [x['SnapshotId'] for x in snapshots] + log.warning( + "Filtered more than one snapshot: %s", + ", ".join(snaps), + ) return self.ec2.Snapshot(snapshots[0]['SnapshotId'])