I am trying to send an email using Amazon SES in AWS Lambda function, For this i am facing the following error.
AccessDenied: User
arn:aws:sts::XXXX
As what others said you should add this two permissions: ses:SendEmail,ses:SendRawEmail
I just want to add explaination for those who use Serverless framework
In serverless.yml:
provider:
name: aws
stage: dev
runtime: nodejs10.x
region: us-west-1
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
- lambda:InvokeFunction
- ses:SendEmail # add this
- ses:SendRawEmail # add this
Resource: '*' # add this