Things I got wrong setting up my first Amplify project

It’s actually 1.14am on a Saturday morning as I write this – though I probably won’t publish it until a more reasonable hour. And I wasn’t actually going to write about this… Or, at least, I wasn’t expecting to be writing this version of events. But I remember listening to a Twitter Space today hosted by Danny Thompson (@DThompsonDev) where he reminded us once again about “the value of learning in public”.

So here we are.

You may have read my previous blog post about the AWS Summit EMEA 2021 which was this week. I learned so much about the features of AWS which I hadn’t had the chance to look at yet, and one of those areas was AWS Amplify. It was actually the first talk I went to and I was determined to try it out this weekend.

Well, I tried that today.

And those AWS pros make it look a lot smoother than I did!

  • Forgot how to set up a React app – this was the first major issue. I posted a while back that I was going to get back into it but it’s been a few months since I worked on a React project, and it has been over a year since I created a React application from scratch! I quickly realised I had forgotten how to use the command line, the correct way to use the ‘create-react-app’ command.
  • How do you commit it to Git?! – Visual Studio makes life so much easier…
  • what on Earth are Execution Policies? – or is my terminal being overdramatic? That was super fun to figure out when I was trying to set up the AWS CLI and Amplify CLI stuff, where my command line kept telling me that I didn’t have permission. Which felt very strange since it is my own machine. How do I not have permission to do something on my own machine? Well apparently it is a thing. Check out the documentation here (about_Execution_Policies) if you ever run into that issue.
  • research group policies – Then when I continued to run into this issue I discovered that ‘Unrestricted’ gives you more permissions than ‘AllSigned’. Who knew? But before I figured this out I went on a mad rabbit hole to update my Group policy and that was going to be a lot more technical than I could deal with at that hour.
  • pulling the data model that I had created using the Amplify console – yes, I did try and install this before the Amplify CLI.
  • downloading Amplify CLI – and yes, I did try and install this before the AWS CLI.
  • downloading AWS CLI
  • can add a new model but I could not pull the one I created in Amplify
  • app won’t run
  • start again
  • app runs initially
  • then doesn’t
  • delete package-lock.json
  • delete another package-lock.json
  • delete node-modules
  • delete other node-modules
  • try npm install and npm start – no start command
  • Ok it’s time for bed, let’s try again tomorrow

I do wish I had been keeping track of all of the errors as I was working on it, but that is how late night coding goes. Especially when I’m trying to relearn one library and try something new at the same time.

There will be another post on how I continued working on it, and (spoiler alert) I did manage to get everything up and running. Hopefully the next one will help you avoid making my mistakes!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: