Coder Social home page Coder Social logo

Comments (4)

Enase avatar Enase commented on May 23, 2024

@BartusZak Please make sure that the default iamRoleStatements stored under provider in configuration tree like that:

custom: ${file(../serverless.common.yml):custom}

provider: # <-- difference is here
  iamRoleStatements:
      - ${file(../serverless.common.yml):lambdaPolicyXRay}
      - Effect: Allow
        Action:
          - dynamodb:Query
        Resource: !Sub "arn:aws:dynamodb:${self:provider.region}:${AWS::AccountId}:table/${self:provider.environment.MULTIBOOKS_DYNAMODB_TABLE}/index/*"

functions:
  currentUserList:
    handler: handlers/currentUser/list.handler
    # iamRoleStatementsInherit: true <-- i still have to explicitly declare it to make it inherit
    iamRoleStatements:
      - Effect: "Allow"
        Action:
          - dynamodb:GetItem
        Resource:
          - !Sub "arn:aws:dynamodb:${self:provider.region}:${AWS::AccountId}:table/${self:provider.environment.USERS_DYNAMODB_TABLE}"
          - !Sub "arn:aws:dynamodb:${self:provider.region}:${AWS::AccountId}:table/${self:provider.environment.RELEASES_DYNAMODB_TABLE}"

from serverless-iam-roles-per-function.

BartusZak avatar BartusZak commented on May 23, 2024

@Enase thanks for comment.
Missing provider is not the problem here.

Originally it's there. I just have cut too much and forgot to include it in my comment. :D

I edited the first comment.

Any other bets? :)

from serverless-iam-roles-per-function.

Enase avatar Enase commented on May 23, 2024

@BartusZak could you please do the following:

  1. open plugin source file in your project. Path sample /node_modules/serverless-iam-roles-per-function/dist/lib/index.js
  2. Go to string #317 - node_modules/serverless-iam-roles-per-function/dist/lib/index.js:317
  3. Add console logs like below
        const isInherit = functionObject.iamRoleStatementsInherit
            || (this.defaultInherit && functionObject.iamRoleStatementsInherit !== false);
        console.log('Default inherit state:', this.defaultInherit);
        console.log('Function inherit state:', functionObject.iamRoleStatementsInherit);
  1. Run sls package and try to find out why your isInherit value is false.

from serverless-iam-roles-per-function.

Enase avatar Enase commented on May 23, 2024

@BartusZak any updates?

from serverless-iam-roles-per-function.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.