amplify-category-api
amplify-category-api copied to clipboard
Parameters: [unauthRoleName] do not exist in the template
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v18.20.2
Amplify CLI Version
12.4.0
What operating system are you using?
Ubuntu (22.04.4)
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made.
Describe the bug
When attempting to update the auth category of a project (when the api category has the status of No Change) the deployment fails with the following error.
Parameters: [unauthRoleName] do not exist in the template
Expected behavior
The auth category changes can be deployed, even if there has been no change to the api category.
Reproduction steps
-
Have an Amplify project with an
apiandauthcategory, where all changes have been deployed and both categories have the statusNo Change -
Make some change to the
authconfig (I upgraded a lambda in the cloud formation template to run node 18 - but any change will trigger this). -
Run
amplify push -y.
The cli will successfully begin deploying the auth changes. It will throw the unauthRoleName error when trying to deploy the api category.
Project Identifier
No response
Log output
# Put your logs below this line
UPDATE_IN_PROGRESS apiPROJECTNAME AWS::CloudFormation::Stack Mon Apr 29 2024 08:17:27 GMT+0000 (Coordinated Universal Time)
UPDATE_FAILED apiPROJECTNAME AWS::CloudFormation::Stack Mon Apr 29 2024 08:17:28 GMT+0000 (Coordinated Universal Time) Parameters: [unauthRoleName] do not exist in the template
Additional information
The changes will successfully deploy IF there is any change to the api category resources. So, adding an arbitrary change to the api configuration will cause both categories to be in the status Update, and then amplify push will successfully complete for both.
Before submitting, please confirm:
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
Hey @alice-was-here, thank you for reaching out. Could you provide us the following information.
- Project identifier output when running
amplify diagnose --send-report - Could you verify if the
team-provider-info.jsonandamplify-meta.jsoncontain theUnauthRoleNameparameter. - type of API created in the project, is this is a GraphQL API or REST API?
- Identifier: 041877376e08b4e55ad7371782ce979b
- Yes, both files contain the
UnauthRoleNameparam. - It is a graphql api.
Hey @alice-was-here, thank you for the information. On diving into the files noticed the parameters.json under the api/<api-name>/build folder contains the following
"authRoleName": {
"Ref": "AuthRoleName"
},
but the parameters.json at the api/<api-name> root folder does not contain this.
Transferring the issue to our API repository for better assistance.
Hey @alice-was-here, Are you still experiencing this issue or blocked by this issue?
Hey 👋 , This issue is being closed due to inactivity. If you are still experiencing the same problem and need further assistance, please feel free to leave a comment. This will enable us to reopen the issue and provide you with the necessary support.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.