amazon-archives / amazon-cognito-auth-js

The Amazon Cognito Auth SDK for JavaScript simplifies adding sign-up, sign-in with user profile functionality to web apps.
Apache License 2.0
424 stars 232 forks source link

Setting Lambda Triggers via SDK does not work [bug report] #223

Open QuantJames opened 4 years ago

QuantJames commented 4 years ago

If a lambda trigger is set up via the SDK (or for instance, via Terraform), then when the lambda attempts to trigger, you'll see something like postconfirmation invocation failed due to error accessdeniedexception. If you navigate to the AWS Console, you will see the lambda correctly selected, however.

The fix is to change it to None in AWS Console, save changes, then change it back to the lambda you want, and save changes again.

This has been a bug for several years and it doesn't appear to have been reported. I first saw it mentioned online in 2016, and discovered it myself today while terraforming a Cognito userpool.