I’m trying to send an email from a function. Everything works fine locally (sls webpack invoke -f crawl
) but after deployment, I find this error in the logs:
Error: AccessDenied: User `arn:aws:sts::812426996283:assumed-role/aws-nodejs-ecma-script-dev-eu-west-1-lambdaRole/aws-nodejs-ecma-script-dev-crawl' is not authorized to perform `ses:SendEmail' on resource `myResource'
serverless.yml
iamRoleStatements:
- Effect: 'Allow'
Action:
- "ses:SendEmail"
Resource:
"myResource"
What am I missing here? The configuration seems to be correct. The specified profile is attached to AdministratorAccess policy.