Skip to content

Commit 3ab4458

Browse files
committed
Fixed Issue #1 - Named parameters to SNS publish call.
1 parent 949c701 commit 3ab4458

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lambda/backuplambda.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def lambda_handler(event, context={}):
427427
sns_boto.publish(error_sns_arn, 'Error in processing volumes: ' + backup_mgr.errmsg, 'Error with AWS Snapshot')
428428

429429
if sns_arn:
430-
sns_boto.publish(sns_arn, backup_mgr.message, 'Finished AWS EC2 snapshotting')
430+
sns_boto.publish(TopicArn=sns_arn, Message=backup_mgr.message, Subject='Finished AWS EC2 snapshotting')
431431

432432
if rds_region_name:
433433
backup_mgr = RDSBackupManager(rds_region_name=rds_region_name,
@@ -446,6 +446,6 @@ def lambda_handler(event, context={}):
446446
sns_boto.publish(error_sns_arn, 'Error in processing RDS: ' + backup_mgr.errmsg, 'Error with AWS Snapshot')
447447

448448
if sns_arn:
449-
sns_boto.publish(sns_arn, backup_mgr.message, 'Finished AWS RDS snapshotting')
449+
sns_boto.publish(TopicArn=sns_arn, Message=backup_mgr.message, Subject='Finished AWS RDS snapshotting')
450450

451451
return json.dumps(result, indent=2)

0 commit comments

Comments
 (0)