Matthew Metros
Matthew Metros

Reputation: 253

Workmail Lambda Permissions denied

I am trying to understand why I cannot call my lambda from AWS Workmail. I obviously have not setup the correct permissions. I am struggling to understand where I am falling short.

One or more inputs was invalid: Cannot call lambda arn:aws:lambda:us-east-1:006640600424:function:toi-ordering-script due to permission denied. Check that WorkMail is authorized to call your function and that the function exists. Read more.

enter image description here

Upvotes: 1

Views: 905

Answers (1)

Marcin
Marcin

Reputation: 238507

I think you haven't given permissions to Workmail to invoke your function, or they are given incorrectly.

You can add such permissions using AWS CLI's add-permission. For example:

aws lambda add-permission \
    --function-name toi-ordering-script \
    --action lambda:InvokeFunction \
    --statement-id workmail \
    --principal workmail.us-east-1.amazonaws.com

You may need to modify it to your specific settings.

Upvotes: 2

Related Questions