def send_to_sns(subject, message):
if aws_sns_arn is None:
return
print("Sending notification to: %s" % aws_sns_arn)
client = boto3.client('sns')
response = client.publish(
TargetArn=aws_sns_arn,
Message=message,
Subject=subject)
if 'MessageId' in response:
print("Notification sent with message id: %s" % response['MessageId'])
else:
print("Sending notification failed with response: %s" % str(response))
ebs-backup-cleanup-lambda.py 文件源码
python
阅读 31
收藏 0
点赞 0
评论 0
评论列表
文章目录