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
I have searched existing issues, it hasn't been reported yet
Issue description
Importing roles like this does not allow the deployment of functions like 'sls deploy -f functionName'. { 'Fn::ImportValue': '***-LambdaAccessRole' }
This is because there is no way to access imported function roles
The fix can be added in
serverless/lib/plugins/aws/deploy-function.js:146:35
Service configuration (serverless.yml) content
N/A
Command name and used flags
sls deploy -f functionName
Command output
TypeError: Cannot read properties of undefined (reading '0')
at AwsDeployFunction.normalizeArnRole (/Users/**/**/**/**/**/**/node_modules/serverless/lib/plugins/aws/deploy-function.js:146:35)
at AwsDeployFunction.updateFunctionConfiguration
Environment information
Tried with sls versions 3.23 and 3.36 (latest)
The text was updated successfully, but these errors were encountered:
I tried a similar fix, but this does not work for me, presumably because I use a reference to the ARN, and not to the role name. (#12372)
Perhaps your fix works because the name of the reference is the same as the name of the role.
Are you certain it's a bug?
Is the issue caused by a plugin?
Are you using the latest v3 release?
Is there an existing issue for this?
Issue description
Importing roles like this does not allow the deployment of functions like 'sls deploy -f functionName'.
{ 'Fn::ImportValue': '***-LambdaAccessRole' }
This is because there is no way to access imported function roles
The fix can be added in
serverless/lib/plugins/aws/deploy-function.js:146:35
Service configuration (serverless.yml) content
N/A
Command name and used flags
sls deploy -f functionName
Command output
Environment information
The text was updated successfully, but these errors were encountered: