AWS Amplify Common Errors (for me)

·

2 min read

I'm trying to get better with AWS Amplify so I've been following some tutorials. The last few times I've gone down this road, I seem to hit the same few snags so I'm writing this post 1) To keep these fixes in a place I can easily find them and 2) to maybe help others if they're able to find this post.

Both of these issues seem to crop up when you're using Amplify for the front-end as well as the back-end. Once I added the back-end functionality to my Amplify projects I frequently had to do these two steps in order to get the build to complete without error.

Gotcha #1: Not having a "service role" defined

Navigate to "All apps" => <your app name> => "App settings: General".

Click the "Edit" button next to "Reconnect repository" image.png If there's no role selected here, and there is no role listed in the drop-down, you'll have to click the "Create new role" button to...(drumroll)...create a new role that has permission to create Amplify resources on your behalf.

Gotcha #2: Specifying the Amplify CLI version

Here's another issue that seems to appear in a lot of online errors/solutions. When you get vague build errors, many times it can be fixed by specifying the correct version of the Amplify CLI. First figure out what version you're running by typing: Amplify -v. Then navigate to "All apps" => <your app name> => "App settings: Build settings". Click the "Edit" button in the "Build image settings" section image.png Here you can click on "Add package version override" to specify the specific Amplify version the build is using, so that it is the same as the version installed locally. This seems to solve a lot of issues.

Anyways...I hope this helps someone other than myself and if you notice anything missing or something is not clear, please comment and let me know. Many thanks.