Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#6240 made lambda execution role names longer, violating maxlength constraint #6338

Open
russell-dot-js opened this issue Jul 6, 2019 · 2 comments

Comments

@russell-dot-js
Copy link

This is a Bug Report

Description

  • What went wrong?
    Fix IAM policies setup for functions with custom name #6240 made the IAM role names longer by appending "lambdaRole" to the end, violating the length constraint

  • What did you expect should have happened?
    IAM role names should be in same format

  • What was the config you used?
    Minimal serverless.yml below:

service:
  name: hello-i-am-borke-service

frameworkVersion: '>=1.1.0 <2.0.0'

provider:
  name: aws
  runtime: nodejs8.10

  iamRoleStatements:
    # lambda
    - Effect: Allow
      Action:
        - lambda:InvokeFunction
      Resource:
        - "*"
    
functions:
  borken:
    handler: src/handlers/borken.handle
    timeout: 30
    iamRoleStatementsInherit: true
    iamRoleStatements:
        # sf
        - Effect: "Allow"
          Action:
            - "states:StartExecution"
          Resource:
            - "*"

plugins:
  - serverless-iam-roles-per-function

Run with sls deploy --stage=staging or --stage=production to repro

Additional Data

  • framework version >= 1.45.1
@keith-pappyflapps
Copy link

Had same issue, had to roll back to 1.38 to resolve

@medikoo
Copy link
Contributor

medikoo commented Jul 8, 2019

@russell-dot-js afaik #6240 didn't change anything in how IAM role is named. Also lambdaRole postfix is appended for years already.

Can you share the difference between generated CF stacks that exposes the issue you're describing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants