Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated to release 1.0.2.
Excerpt

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

Insert excerpt
_JSONEscapingRequirements
_JSONEscapingRequirements
nopaneltrue

Tip
titleJSON 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.

Code Block
languagejs
linenumberstrue
collapsetrue
{
  "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}"
}