Skip to content

Commit a0d18a3

Browse files
committed
Added ignore for VSCode and comments to code for readability
1 parent cb00138 commit a0d18a3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ node_modules
55
# CDK asset staging directory
66
.cdk.staging
77
cdk.out
8-
.DS_Store
8+
.DS_Store
9+
.vscode

Diff for: assets/exporter/main.py

+3
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,14 @@ def handle_message(message, message_id):
7676
# Each snapshot type and source requires a slightly different handling
7777
for i, rds_event_id in enumerate(rds_event_ids):
7878

79+
# Identify and process an automated RDS snapshot
7980
if message["Event ID"].endswith(rds_event_id) and re.match(
8081
"^rds:" + DB_NAME + "-\d{4}-\d{2}-\d{2}-\d{2}-\d{2}$",
8182
message["Source ID"],
8283
) and rds_snapshot_types[i] == RdsSnapshotType.AUTOMATED:
8384
process_automated_snapshot(message, message_id, db_snapshot_types[i])
8485
break
86+
# Identify and process an Manual RDS snapshot, which was not created by AWS Backup
8587
elif message["Event ID"].endswith(rds_event_id) and (
8688
not re.match(
8789
"^rds:" + DB_NAME + "-\d{4}-\d{2}-\d{2}-\d{2}-\d{2}$",
@@ -91,6 +93,7 @@ def handle_message(message, message_id):
9193
) and rds_snapshot_types[i] == RdsSnapshotType.MANUAL:
9294
process_manual_snapshot(message, message_id, db_snapshot_types[i])
9395
break
96+
# Identify and process an AWS Backup snapshot
9497
elif (message["Event ID"].endswith(rds_event_id) and
9598
message["Source ID"].startswith("awsbackup:job-") and
9699
rds_snapshot_types[i] == RdsSnapshotType.BACKUP

0 commit comments

Comments
 (0)