Skip to content

Commit 8f38cda

Browse files
author
Dave Osment
committed
1. Removed DryRun from delete_snapshot
2. Excluded all source SnapShots not in yet in a 'completed' state
1 parent 3f70769 commit 8f38cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ebs-snapshot-offsiter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def lambda_handler(event, context):
1414
snapshots = ec.describe_snapshots(
1515
Filters=[
1616
{ 'Name': 'tag-key', 'Values': ['DestinationRegion'] },
17+
{ 'Name': 'status', 'Values': ['completed'] },
1718
]
1819
)
1920

@@ -74,7 +75,6 @@ def lambda_handler(event, context):
7475
)
7576

7677
ec.delete_snapshot(
77-
DryRun=True,
7878
SnapshotId=snapshot['SnapshotId']
7979
)
8080

0 commit comments

Comments
 (0)