amplify-cli
amplify-cli copied to clipboard
Parameters: [unauthRoleName, authRoleName] must have values on `amplify push function`
Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v14.18.2
Amplify CLI Version
7.6.7
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Amplify Categories
function
Amplify Commands
add, push
Describe the bug
It's not possible to push a new lambda function with CLI.
UPDATE_FAILED api AWS::CloudFormation::Stack Mon Jan 10 2022 22:32:05 GMT+0100 (Central European Standard Time) Parameters: [unauthRoleName, authRoleName] must have values
CREATE_FAILED functiontest AWS::CloudFormation::Stack Mon Jan 10 2022 22:32:06 GMT+0100 (Central European Standard Time) Resource creation cancelled
UPDATE_FAILED AuthTriggerCustomLambdaStack AWS::CloudFormation::Stack Mon Jan 10 2022 22:32:06 GMT+0100 (Central European Standard Time) Resource update cancelled
Expected behavior
UPDATE_COMPLETE
Reproduction steps
- amplify add function
- choose Lambda function
- function name => test
- runtime => NodeJS
- function Template => Hello world
- advanced settings => No
- amplify push function test
- " Function │ test │ Create │ awscloudformation"
- continue => Y
- [unauthRoleName, authRoleName] must have values
GraphQL schema(s)
# Put schemas below this line
Log output
# Put your logs below this line
Additional information
No response
I also have been dealing with this exact same issue. Fails with this same error on a few existing and unchanged REST APIs when trying to push a minor update on the GraphQL API
Parameters: [authRoleName, unauthRoleName] must have values
Amplify CLI Version 7.6.8
Hey @MichaelPlan :wave: thanks for raising this! From the CloudFormation lines you posted I noticed this is failing for your API, is this a REST API by chance?
UPDATE_FAILED api AWS::CloudFormation::Stack Mon Jan 10 2022 22:32:05 GMT+0100 (Central European Standard Time) Parameters: [unauthRoleName, authRoleName] must have values
If so, was this project recently migrated from using an older version of the CLI?
@josefaidt yes, the project was recently migrated. The only solution to fix it was to create a complete new project. But after some days working with the new version, I'm now getting this for hours:
A deployment is in progress. If the prior rollback was aborted, run: "amplify push --iterative-rollback" to rollback the prior deployment "amplify push --force" to re-deploy
when try to push anything.
I pulled everything again and made some small changes, but nothing works anymore. With "amplify push --iterative-rollback" I 'm getting ": ["Index: 1 State: {"preRollback":"previousDeploymentReadyCheck"} Message: Resource is not in the state stackUpdateComplete"]":
In amplify studio I can see "Deployment completed".
Do you have any solution for the problem? Is it possible to abort a deployment?
Did you previously override cloudformation configuration directly?
Hey @MichaelPlan :wave: to mitigate the parameters issue we should be able to safely remove those parameters, though ideally this should have been done for us. For the deployment issue, if you visit the CloudFormation console do you see a deployment in progress by chance?
Closing due to inactivity. @MichaelPlan if you are still experiencing this issue please reply back to this thread and we can re-open to investigate further 🙂
Hey, I'm having similar issues.
I am on version 7.6.21 and migrated to Transformer v2.
amplify push
work fine, but amplify function push
and amplify function push locationGeocoder
throws the following error:
UPDATE_FAILED apicondominium AWS::CloudFormation::Stack Wed Feb 23 2022 08:26:08 GMT+0100 (Central European Standard Time) Parameters: [unauthRoleName, authRoleName] must have values
This is from a newly redeployed Stack as well.
The only place I'm using these values as parameters is within the Geo resource, which was generated by Amplify.
Hey @LucasKnudsen apologies for the delay! I was able to successfully reproduce this with the following steps on the latest version of the Amplify CLI (7.6.22):
- create a new project with
amplify init -y
- add a GraphQL API with
amplify add api
, choose IAM as an auth mode a. in my reproduction, I chose Cognito as the default auth mode and IAM as an additional auth mode - push with
amplify push -y
- add a function with
amplify add function
- attempt to push just the new function with
amplify push function <my-function-name>
oramplify push function
- observe error
Marking as a bug 🙂
Hello,
I am experiencing the same bug when trying to push only function. I have the latest version of amplify (8.3.1). Any ideas?
Thanks!
Hello,
I am experiencing the same bug when trying to push only function. I have the latest version of amplify (8.3.1). Any ideas?
Thanks!
It happens to me too but in my case I recreated the table that was linked to a given function. After that amplify function push started throwing those errors. Relinking the function to the table by amplify function update might solve it.
Also experiencing this bug on pushes for functions. Edit: I'm on amplify CLI version 8.5.0
From the comments, I found that the amplify push api
, amplify push function
, and other Backend-only functions have similar errors.
I was able to get around the error and update Backend with amplify push
.
I hope this obstacle will be remedied.
amplify -v 9.0.0
I am also still finding the same issue when running amplify push function
in version 9.1.0
I tried deleting the amplify directory and pulling a fresh copy using amplify pull --appId <appId>
but still found the issue persisted when I changed the lambda function runtime code and tried to push.
For now I am also able to use the workaround of just pushing everything with amplify push
, but this does take significantly longer.
@josefaidt - Please could this issue be investigated further/reopened?
Hey @dwil618 and folks in the thread :wave: thank you for bringing this to our attention! I was able to successfully reproduce this with version 9.1.0 using amplify push function
in an existing Amplify app, receiving:
UPDATE_FAILED api9966 AWS::CloudFormation::Stack Wed Jul 20 2022 10:20:43 GMT-0500 (Central Daylight Time) Parameters: [unauthRoleName, authRoleName] must have values
Re-opening and marking as a regression
I'm also stuck with this error. amplify -v 9.2.0
I'm also stuck with this error. amplify -v 9.2.0
I managed to get past this by doing an amplify pull and then amplify push
Seeing this error when I tried to push a schema change from IDE
Fails when I edit schema on Amplify Studio and try to deploy the changes as well
Fails CI/CD builds
all of this happened after I’ve added and deployed a post confirmation trigger from the AWS console. Removing the trigger didn’t seem to help
Not able to get past this issue with amplify push
either
I’m stuck
this error is also occurring after amplify add geo amplify push
Parameters: [unauthRoleName] must have values
i've tried a thousand different methods and suggestions to get it working, but no go.
9.2.0 - same here. can amplify push
but not amplify function push
@dwil618
significantly longer
The reason it's failing on other services when calling amplify push <category>
is because it always does a full push. The only thing specifying the category does; to my understanding, is filter the update table at the start so you only see what matters to you for that push since that list can become quite large.
However if you want to speed things up a bit, you can add --yes
after your pull/push to not pause on that table and have to hit enter.
Hi all, so far I'm unable to repro this using v 9.2.1 of the CLI. Is anyone still having this issue on that version?
Still an issue for me with CLI 9.2.1
Amplify push (with or without category part) and deployments fail with same errors
Same, seeing this in CI/CD builds of a custom function. The logs say they patched the CLI to v 9.2.1:
Done patching NPM package '@aws-amplify/cli' to version 9.2.1
I'm not seeing the issue from local amplify push
though
Edit 2 days later: the issue disappeared for me as mysteriously as it appeared.
Seeing the issue as well.
@edwardfoyle yes, I'm at 9.2.1.
seeing the issue as well, amplify push
leads to an error in both the UI and CLI (9.2.1):
AWS::CloudFormation::Stack Sat Sep 03 2022 14:04:58 GMT-0600 (Mountain Daylight Time) Parameters: [unauthRoleName] must have values
Had a similar issue. Here's my solution https://stackoverflow.com/a/73673509/11135757
Had a similar issue. Here's my solution https://stackoverflow.com/a/73673509/11135757
It was a nightmare but I did the above and didn’t help me. On CI/CD it specifically says unAuthUserRole issue but on the react app it now says Resource not in StackUpdateComplete. Previously the above was followed by unAuthRole error
Had a similar issue. Here's my solution https://stackoverflow.com/a/73673509/11135757
It was a nightmare but I did the above and didn’t help me. On CI/CD it specifically says unAuthUserRole issue but on the react app it now says Resource not in StackUpdateComplete. Previously the above was followed by unAuthRole error
Check if you see the identity pool linked in your "Authentication" section in Amplify Studio. Additionally, you can add StackUpdateComplete to your auth profile.
@bordernone
I have a cognitive userpool linked. Any idea how I can add the stackUpdateComplete to the auth profile. Thank you for the response