UPDATE_FAILED error: api [unauthRoleName, authRoleName] do not exist in the template

0

We are using the AWS React Amplify application while pushing the current code to amplify it's through a build error. I will share my error screenshot of the Amplify build error (amplify_build_error.png) and cloud formation stack (cloudformationstack.png) for your reference.

How do I resolve this error?

amplify build error backend

stack error

1개 답변
0
수락된 답변

Hello,

Thank you for posting on AWS re:Post forum. This is Tom from AWS Support Team.

I understand that, while trying to update the Amplify application, you observed CloudFormation error stating some parameters do not exist in the template.

I have searched across Amplify GitHub forum, and it appears that for some prior version of Amplify CLI, there was a known issue [1] with the same error reported and has since then been resolved. Therefore, please confirm current Amplify CLI version by running command "amplify -v", update to the latest version through "npm i -g @aws-amplify/cli@latest" [2], and try pushing the change to Amplify again.

If the missing parameter error continues, please follow the resolution guide here [3] by updating the existing REST API with a new function, making a push, verifying the CloudFormation template, including the missing "unauthRoleName" and "authRoleName" parameters into the template, and running Amplify push command again.

Additionally, looking from this post thread [4], it looks like earlier versions of Amplify CLI may include empty function objects on "backend-conf.json" when pulling from the cloud. In such case, you may execute "amplify remove function" to remove any unused functions for Amplify to accept the CloudFormation template.

Lastly, if Amplify continues showing CloudFormation error when pushing changes, please feel free to raise a new issue on Amplify Github page [5] for further in-depth replication and troubleshooting efforts.

Once again, thank you for posting on AWS re:Post forum. Have a nice day.

Links and References

[1] https://github.com/aws-amplify/amplify-cli/issues/4814

[2] https://www.npmjs.com/package/@aws-amplify/cli

[3] https://github.com/aws-amplify/amplify-cli/issues/2519#issuecomment-835902300

[4] https://github.com/aws-amplify/amplify-cli/issues/7318#issuecomment-842059362

[5] https://github.com/aws-amplify/amplify-cli/issues/

AWS
지원 엔지니어
답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠