I\'m trying to send SNS messages via CLI in json format.
aws sns publish --cli-input-json \"{\\\"TopicArn\\\":\\\"xxx\\\",\\\"Message\\\":\\\"first line\\n
I think \\n
is actually what you are looking for. I've just tested it by sending push notifications to my device through AWS SNS.
So your message should look like this:
aws sns publish --cli-input-json "{\"TopicArn\":\"xxx\",\"Message\":\"first line\\nsecond line\",\"Subject\":\"Empty subject\"}"
Note, you should not leave the white space after the line break symbol, otherwise, your new line would start with that space.