Skip to content

Commit

Permalink
Merge pull request #10 from skwashd/master
Browse files Browse the repository at this point in the history
Allow shorter db names
  • Loading branch information
eze-godoy committed Jun 12, 2023
2 parents c99c93d + 05d42ca commit e7e14b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/export-to-s3/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def handler(event, context):
matchSnapshotRegEx = "^rds:" + db + "-\d{4}-\d{2}-\d{2}-\d{2}-\d{2}$"
if re.match(matchSnapshotRegEx, sourceId):
exportTaskId = ((sourceId[4:] + '-').replace("--", "-") + messageId)[:60]
if exportTaskId[59] == "-":
exportTaskId = exportTaskId[:59]
if exportTaskId[-1] == "-":
exportTaskId = exportTaskId[:-1]
response = boto3.client("rds").start_export_task(
ExportTaskIdentifier=exportTaskId,
SourceArn=sourceArn,
Expand Down

0 comments on commit e7e14b9

Please sign in to comment.