Set the appropriate SNS subject when sending CloudFormation stack events (#4479)
This commit is contained in:
parent
7e3db1ecac
commit
6c9f959b94
@ -477,7 +477,9 @@ ClientRequestToken='{client_request_token}'""".format(
|
||||
)
|
||||
|
||||
for sns_topic_arn in sns_topic_arns:
|
||||
sns_backends[region].publish(message, arn=sns_topic_arn)
|
||||
sns_backends[region].publish(
|
||||
message, subject="AWS CloudFormation Notification", arn=sns_topic_arn
|
||||
)
|
||||
|
||||
|
||||
def filter_stacks(all_stacks, status_filter):
|
||||
|
@ -209,6 +209,7 @@ def test_create_stack_with_notification_arn():
|
||||
message = queue.read(1)
|
||||
|
||||
msg = json.loads(message.get_body())
|
||||
msg["Subject"].should.equal("AWS CloudFormation Notification")
|
||||
msg["Message"].should.contain("StackId='{}'\n".format(stack.stack_id))
|
||||
msg["Message"].should.contain("Timestamp='2015-01-01T12:00:00.000Z'\n")
|
||||
msg["Message"].should.contain("LogicalResourceId='test_stack_with_notifications'\n")
|
||||
|
@ -1047,6 +1047,7 @@ def test_create_stack_with_notification_arn():
|
||||
messages = queue.receive_messages()
|
||||
messages.should.have.length_of(1)
|
||||
msg = json.loads(messages[0].body)
|
||||
msg["Subject"].should.equal("AWS CloudFormation Notification")
|
||||
msg["Message"].should.contain("StackId='{}'\n".format(stack.stack_id))
|
||||
msg["Message"].should.contain("LogicalResourceId='test_stack_with_notifications'\n")
|
||||
msg["Message"].should.contain("ResourceStatus='CREATE_IN_PROGRESS'\n")
|
||||
|
Loading…
Reference in New Issue
Block a user