SES Resource not added in created iAM role for Lambda functions, iamRoleStatements


#1

I have iamRoleStatements section in my serverless.yml as

 iamRoleStatements:
    - Effect: Allow
      Action:
        - ses:SendEmail
        - ses:SendRawEmail
        - dynamodb:*
      Resource: 
        - "arn:aws:dynamodb:${self:provider.region}:*:table/*"
        - "arn:aws:ses:${self:provider.region}:*:*"

Generated role for lambda function does not include “arn:aws:ses:${self:provider.region}::” resource in generated role on IAM.
I have looked in cloud formation template generated by serverless and this is missing there as well

template policy under IamRoleLambdaExecution is as follows

    {
                  "Effect": "Allow",
                  "Action": [
                    "ses:SendEmail",
                    "ses:SendRawEmail",
                    "dynamodb:*"
                  ],
                  "Resource": [
                    "arn:aws:dynamodb:us-east-1:*:table/*"
                  ]
           }

Am I doing something wrong here?. If I add this resource manually from aws web interface it works fine . serverless seems to ignore it while generating role for lambda function.

Thanks in advance


#2

Never mind, it works. I had a typo in my serverless.yml. Above given code works