amplify-category-api icon indicating copy to clipboard operation
amplify-category-api copied to clipboard

Parameters: [unauthRoleName] do not exist in the template

Open alice-was-here opened this issue 1 year ago • 3 comments

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

  1. Have an Amplify project with an api and auth category, where all changes have been deployed and both categories have the status No Change

  2. Make some change to the auth config (I upgraded a lambda in the cloud formation template to run node 18 - but any change will trigger this).

  3. 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.

alice-was-here avatar Apr 29 '24 08:04 alice-was-here

Hey @alice-was-here, thank you for reaching out. Could you provide us the following information.

  1. Project identifier output when running amplify diagnose --send-report
  2. Could you verify if the team-provider-info.json and amplify-meta.json contain the UnauthRoleName parameter.
  3. type of API created in the project, is this is a GraphQL API or REST API?

ykethan avatar Apr 29 '24 20:04 ykethan

  1. Identifier: 041877376e08b4e55ad7371782ce979b
  2. Yes, both files contain the UnauthRoleName param.
  3. It is a graphql api.

alice-was-here avatar Apr 30 '24 00:04 alice-was-here

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.

ykethan avatar Apr 30 '24 15:04 ykethan

Hey @alice-was-here, Are you still experiencing this issue or blocked by this issue?

AnilMaktala avatar May 29 '24 22:05 AnilMaktala

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.

AnilMaktala avatar Jun 24 '24 17:06 AnilMaktala

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.

github-actions[bot] avatar Jun 24 '24 17:06 github-actions[bot]