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
Ever since I have used serverless framework (a couple of years, since early v2 versions), deploying individual functions did not work for me. The same error always occurs, for all my stacks, even though full stack deployments of the exact same configuration are not a problem.
Concretely, on deploying an individual function, the following message appears: Cannot read properties of undefined (reading '0')
It appears that "deploy-function.js" "normalizeArnRole" accepts a role, and attempts to extract the arn of the role. It does so based on this line:
const data = await this.provider.request('IAM', 'getRole', {
RoleName: role['Fn::GetAtt'][0],
});
However, when I log the input received for my function, it is: { 'Fn::ImportValue': 'myRoleArnReference' }
If I hardcode the ARN into the configuration instead of using the !ImportValue statement, the deployment works fine.
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
Ever since I have used serverless framework (a couple of years, since early v2 versions), deploying individual functions did not work for me. The same error always occurs, for all my stacks, even though full stack deployments of the exact same configuration are not a problem.
Concretely, on deploying an individual function, the following message appears: Cannot read properties of undefined (reading '0')
It appears that "deploy-function.js" "normalizeArnRole" accepts a role, and attempts to extract the arn of the role. It does so based on this line:
However, when I log the input received for my function, it is:
{ 'Fn::ImportValue': 'myRoleArnReference' }
If I hardcode the ARN into the configuration instead of using the !ImportValue statement, the deployment works fine.
Any help is very much appreciated.
Service configuration (serverless.yml) content
Command name and used flags
sls deploy function --stage dev -f my_function
Command output
Environment information
The text was updated successfully, but these errors were encountered: