-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generate-event sns adds in " html entities #755
Comments
It looks like dcd65f4 is the commit that introduced this issue. With this commit, sam uses a templating engine. I think that the solution would be to change You can look at https://github.com/noahmorrison/chevron/blob/master/tests/test.mustache for more details about how the templating engine renders variables. |
@ste00martin Thanks for the report. @jackdbernier is correct. More details on how mustache behaves in the variable section here |
The combo of triple braces and json escaping works.
will output
if you omit the jq part you will end up with something like Thanks for jumping on that. |
This was released in v0.9.0 Closing |
On aws-cli version 0.6.2
Expected output of
sam local generate-event sns notification --message "$(cat event.json)"
Actual output:
My event.json file:
On aws-cli version 0.3.0 it works correctly. However, the way you have to invoke generate-event is different between versions. The way to call generate-event on v0.3.0 with the correctly formatted response is this way:
sam local generate-event sns --message "$(cat event.json)"
which outputs the first json blob.For now my workaround is to use the older version; but when will this be fixed going forward so:
a) newer versions of aws-cli has backwards compatibility
b) json files are parsed correctly
c) you can pass in a json file directly into the
generate-event
command without thecat
command?The text was updated successfully, but these errors were encountered: