in lambda/snapshots_tool_utils.py [0:0]
def get_latest_snapshot_ts(instance_identifier, filtered_snapshots):
# Get latest snapshot for a specific DBInstanceIdentifier
timestamps = []
for snapshot,snapshot_object in filtered_snapshots.items():
if snapshot_object['DBInstanceIdentifier'] == instance_identifier:
timestamp = get_timestamp_no_minute(snapshot, filtered_snapshots)
if timestamp is not None:
timestamps.append(timestamp)
if len(timestamps) > 0:
return max(timestamps)
else:
return None