I attached lambda function to my user pool.
When i am creating the user pool first time using terraform, it is not working with error: "Lambda function: AccessDenied"
If I remove the lambda function and reattach it, it is working fine.
Any clue why this is happening?
Solved with below!!
Reference: https://forums.aws.amazon.com/thread.jspa?messageID=804779󄞫
If you associate a Lambda function through CLI, then you have to call the AddPermission API on that function to grant Amazon Cognito permissions to be able to invoke it. You can use the following parameters
"Action": "lambda:InvokeFunction", "Principal": "cognito-idp.amazonaws.com", "SourceArn": "", "StatementId": "Any string you like"
http://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With