You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 theroleName
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
roleName
s 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. Thestage
has 9 characters. ThelambdaName
has 21 characters. And theregion
isus-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
The text was updated successfully, but these errors were encountered: