Skip to content
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

SyntaxError: Unexpected token T #24

Open
woodland-appcolony opened this issue Nov 28, 2017 · 1 comment
Open

SyntaxError: Unexpected token T #24

woodland-appcolony opened this issue Nov 28, 2017 · 1 comment

Comments

@woodland-appcolony
Copy link

Looks like a great lambda implementation, would love to use it, but it seems to be doing something odd.

First, Lambda's default SNS test event causes this failure:

2017-11-28T19:37:15.286Z	1a21cdd9-d473-11e7-89a1-a3392781a961	SyntaxError: Unexpected token T
at Object.parse (native)
at handleCatchAll (/var/task/index.js:282:24)
at processEvent (/var/task/index.js:347:20)
at exports.handler (/var/task/index.js:370:5)

Second, I sent Elastic Beanstalk events through SNS to this Lambda code, and strangely enough it was being handled by the catch-all, not the Elastic Beanstalk handler.

And, those Beanstalk events would fail with the exact same error above.

@JeroenRijks
Copy link

JeroenRijks commented Apr 30, 2020

Hey @woodland-appcolony , I know this was two and a half years ago, but I'm running into the same issue, only with EC2 events through SNS, instead of Elastic Beanstalk. Did you figure out what the issue is?

Edit:
It seems like this issue occurs when the SNS topic requires encryption (using the SSE key), because you can't set CloudWatch up to encrypt its own messages using the SSE KMS key.

Workaround is to either create a KMS key that Cloudwatch can use, or to not encrypt your SNS topic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants