The following macros are not currently supported in the header:
  • unmigrated-wiki-markup

Documentation for Automation with AWS AWS 1.1 – other releases are available in the Automation with AWS Documentation Directory.
View

Unknown macro: {spacejump}

or visit the current documentation home.

Publish SNS Message - structured JSON format

This parameters template demonstrates publishing a SNS message in structured JSON format with the Publish SNS Message action:

JSON escaping requirements

If a parameter within the JSON formatted parameters template is a JSON structure in itself, it needs to be escaped before adding it as a value - this has two implications:

  • (tick) custom content needs to be escaped, which can be achieved with one of the many offline and online tools for this purpose, for example Code Beautify's Javascript Escape/Unescape
  • (error) variables with conflicting content (notably multi line variables like JIRA's $issue.description or Bamboo's $notification.textEmailContent) can not currently be used in this context (while all variables are escaped by default, they need to be escaped again when used within an already nested JSON structure) - this will be addressed in a near future release

JSON Message Generator

The AWS Management Console features a JSON Message Generator that eases composition of the required JSON message structure, refer to section Create Different Messages for Each Protocol for within Publish to a topic for details.

{
  "TopicArn": "arn:aws:sns:ap-southeast-2:123456789012:sample-AutomationWithAWSQuickstartSNSTopic-15EO7TT8O93XT",
  "Message": "{\n\"default\": \"$event.simpleName with trace ID $event.traceId triggered at $event.timestamp\"\n}\n",
  "MessageStructure": "json",
  "Subject": "Automation with AWS: $event.simpleName triggered at $event.timestamp"
}

Atlassian®, Atlassian Bamboo®, Bitbucket®, Atlassian Crowd®, Confluence®, Jira®, Jira Service Management™, Opsgenie®, and Statuspage™ are registered trademarks of Atlassian.
Amazon Web Services™, AWS™ and the “Powered by Amazon Web Services” logo are trademarks of Amazon.com, Inc. or its affiliates in the United States and/or other countries.

Utoolity® is a registered trademark of Utoolity GmbH.
© 2024 Utoolity GmbH. All rights reserved.