1

I am developing an app for my company that utilises API gateway REST endpoints with lambda functions, and cognito user pool (with groups) for authorisation.

I tried adding a new endpoint yesterday and received the error that the role's policy was too large (exceeded X bytes) - after looking into this issue I saw that a newer version of AWS amplify CLI (namely 4.50.0) circumvents this issue by consolidating and combining similar inline policies to reduce the total size.

I upgraded to this version of the Amplify CLI and lo-and-behold this issue was fixed, but then I was presented with another issue... upon trying to push ANY changes via amplify push, I now get the following error:

Parameters: [unauthRoleName, authRoleName] do not exist in the template

What 'template' is this error referring to, and how can I resolve it? I've seen some potential solutions after googling but none of which actually worked for me, and for those people whom it did work for, it was only a temporary fix. Ultimately, if there's something that I need to keep doing as a temporary fix then I'll accept it and it'll do, but I'd like to know how to resolve this issue permanently, as I think that there must be something missing either on my end or on AWS cloud... maybe an artifact of the initial error encountered prior to upgrading the CLI?

Thanks for any help and it's much appreciated :)

1 Answer 1

7

I discovered the issue to be the Amplify CLI removing the following from amplify/backend/api/APPNAME/APPNAME-cloudformation-template.json:

"authRoleName": { "Type": "String" }, "unauthRoleName": { "Type": "String" } 

After manually adding this back in and re-adding until it stuck and was no longer removed, the issue is resolved.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.