Skip to content

Commit

Permalink
Allow shorter db names
Browse files Browse the repository at this point in the history
fixes #9
  • Loading branch information
skwashd committed May 29, 2023
1 parent c99c93d commit 05d42ca
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 05d42ca

Please sign in to comment.