Giter VIP home page Giter VIP logo

Comments (5)

tgensol avatar tgensol commented on May 24, 2024

I just found that it is doing the same if I use the classic iamRoleStatements in the main provider. Is It an serverless issue or we cannot do what I want to do ? (I was using before an role that I created manually)

from serverless-iam-roles-per-function.

glicht avatar glicht commented on May 24, 2024

Not sure I fully understand your issue. If you can provide reference to a simple demo project, I think it can help. Anyway, as it sounds like an issue which is also relevant for provider level statements, it is probably best to try to bring this up with the serverless framework.

from serverless-iam-roles-per-function.

tgensol avatar tgensol commented on May 24, 2024

@glicht Thanks ! I will try to ask on the serverless community too, it is maybe a missunderstanding of myself :

service: serverless-function

provider:
  name: aws
  runtime: python3.6
  region: us-east-1
  cfLogs: true

functions:
  post:
    handler: handler.post
    memorySize: 512
    timeout: 60
    iamRoleStatements:
         - Effect: "Allow"        
           Action:
             - lambda:InvokeFunction
           Resource: 
             - arn:aws:lambda:us-east-1:###
             - arn:aws:lambda:eu-west-1:###    

If I am using this code above or below :

service: serverless-function

provider:
  name: aws
  runtime: python3.6
  stage: prod
  region: us-east-1
  iamRoleStatements:
    - Effect: "Allow"
      Resource: 
             - arn:aws:lambda:us-east-1:###
             - arn:aws:lambda:eu-west-1:###    
      Action:
        -  "lambda:InvokeFunction" 

Both the final ARN on the AWS IAM will become arn:aws:lambda:us-east-1:### and arn:aws:lambda:us-east-1:### because the function is in the region us-east-1, how can we have ARNS from differents regions of the actual region of the function ? I can see that the cloud formation template automatically replace the regions with {AWS::Region}. But can we disable this ?

Thanks !

from serverless-iam-roles-per-function.

glicht avatar glicht commented on May 24, 2024

Are you using the plugin: serverless-pseudo-parameters? If so, i think that plugin does this replacement of region automatically.

from serverless-iam-roles-per-function.

tgensol avatar tgensol commented on May 24, 2024

@glicht Oh yes you were right, my issue was coming from this plugin... Thanks a lot for your time and your plugin !

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.