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

Lambda deployment failing due to roleRole too long after updating to serverless 1.42.0 #6198

Open
erickpires opened this issue May 31, 2019 · 7 comments

Comments

@erickpires
Copy link

erickpires commented May 31, 2019

This is a Bug Report

Description

Recently I updated from serverless version 1.38.x to the latest version (1.44.1) and the deployment of some of my lambdas stopped working due to the name of the roleName length been greater than 64. After some investigation I was able to conclude that the error started happening on version 1.42.0.

  • What went wrong?
    The name of the roleName is built using the template {service}-{stage}-{lambdaName}-{region}-lambdaRole. On version 1.41.1, if this name is longer than 64 characters the roleName is been generated without the last part (i.e. -lambdaRole), which is an interesting behavior since this suffix is 11 characters long.
    On version 1.42.0 the behavior changed and the suffix is always been added. This made some roleNames that previously had 54 characters jump to 65 characters and now I am not able to deploy my stack anymore unless I rename some of my lambdas or my project.

  • What did you expect should have happened?
    Either the old behavior of selectively removing the suffix lambdaRole should be maintained or there should be a way of specifying the lambda role name.

  • What was the config you used?
    The lambda role is been generated from iamRoleStatements that are specified per lambda.
    The service has 12 characters. The stage has 9 characters. The lambdaName has 21 characters. And the region is us-east-1.

  • What stacktrace or error message from your provider did you see?
    An error occurred: "..."IamRoleLambdaExecution - 1 validation error detected: Value '"..."-lambdaRole' at 'roleName' failed to satisfy constraint: Member must have length less than or equal to 64 (Service: AmazonIdentityManagement; Status Code: 400; Error Code: ValidationError; Request ID: "...").

Similar or dependent issues:

Additional Data

  • Serverless Framework Version you're using: 1.42.0
  • Operating System: Windows 10 (win32)
  • Stack Trace: NA
  • Provider Error messages: Described above.
@danielo515
Copy link

Have you ever found a workaround to this?

@erickpires
Copy link
Author

Have you ever found a workaround to this?

None. For the time being I'm using version 1.41.1 and hoping I don't need any of the newer features.

@devsatishm
Copy link

I can see this behavior with version 1.41.1 too.

Screen Shot 2019-08-23 at 5 37 46 PM

@seancsnyder
Copy link

Error occurring on v1.50.1 as well.

@athom
Copy link

athom commented Sep 12, 2019

same in 1.49.0
is that any options to override the roleName?

@danielo515
Copy link

This is clearly a feature regression. Adding 11 extra useless characters when there is so tight length constrains is not acceptable.

@Sledro
Copy link

Sledro commented Dec 9, 2020

Same issue

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

7 participants