Home > OS >  CREATE_FAILED: IamRoleLambdaExecution (AWS::IAM::Role)
CREATE_FAILED: IamRoleLambdaExecution (AWS::IAM::Role)

Time:11-06

How I fix this one.

Error: I am getting this error when deploy

serverless.yml


provider:
  name: aws
  runtime: nodejs12.x
  memorySize: 256
  stage: ${opt:stage, 'dev'}
  region: eu-west-1
  iamRoleStatements:
    - Effect: Allow
      Action:
        - dynamodb.PutItem
      Resource: 
        - arn:aws:dynamodb:#{AWS::Region}:#{AWS::AccountId}:table/AuctionsTable  

I am new to aws services and serverless app development when running sls deploy I am getting below error.

CodePudding user response:

You have error in policy document, you used .(dot) in place of :(colon).

iamRoleStatements:
    - Effect: Allow
      Action:
        - dynamodb:PutItem # use `:` here instead of `.`
  • Related