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
Deploy individual function, role arn normalisation fails on imported role ARN #12372
Open
4 tasks done
Comments
I found this related issue: #12238 |
4 tasks
A local fix for me is to edit the "deploy_function.js" as folllows: Add resolve import value function: On line 419 of the same file:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: