The pros and cons of working with AWS Amplify

18 October 2023

Speed vs Flexibility: What is more important to you and what are you willing to trade so that you can have one over the other?

AWS Amplify is a powerful development framework which aims to help developers deliver web and mobile apps at speed. It has features like user and content management, easy REST API and database integration, and its own CLI tool, allowing you to easily configure and manage your application backend with just a few commands.

Some Context - Hi-Five

Here at Instil, we recently trialled the use of Amplify in a few of our internal projects, one of them being our Graduate Induction programme. We created Hi-Five, a Slack app that lets you send kudos to your teammates. This application is integrated with a web dashboard which we built using React, with Amplify on the backend.

Whilst Amplify allowed us to speed up some aspects of development, it also has drawbacks that hindered developer productivity in other ways. In this post, I will cover both - the good and bad.

The Good

Rich User Management System

For our web dashboard to be feasible, we needed to link the user management to a Google application so that Instillers could easily log with our Instil email domain. We also needed to have 2 tiers of authorisation so that only Instil admins could actually view our web dashboard.

Amplify uses AWS Cognito as its user management system of choice, which made it surprisingly simple to create users and implement the two tiers of access.

Hooking Cognito up to a Google account meant that our users were automatically created the first time they tried to log into the app via the OAuth system.

The only downside to this system was that we had to add users to the admin group manually once their account had been created via the AWS Console. However, this functionality can be automated using Cognito Lambda Triggers

Abstraction of backend services

This can be a good or a bad thing depending on what way you look at it. In our case, it was mainly a negative experience but we’ll get into that in a minute.

Amplify is powerful enough to create whole backends (multiple) for your application with the use of just a few CLI commands. It will auto generate Dynamo DB tables, GraphQL queries and more depending on how you set it up.

For someone building a brand new app from scratch, I can see why this would be a very appealing feature. It takes all the heavy lifting away from you having to go and spin up all of these AWS services yourself and hook them all up together.

Cross Platform Development

AWS Amplify supports a range of platforms, including web, mobile, and desktop. This makes it easy for developers to build applications that work seamlessly across different devices and platforms.

For mobile app development, Amplify libraries support iOS, Android, Web, Flutter, and React Native apps.

For Web apps, there is deep integration with React, Ionic, Angular, and Vue.js.

The Bad

Linking to existing backend services

So, Amplify can create all your backend services from scratch but what if you already have your own Dynamo DB table that you want to connect to the new frontend?

This can be done, however it can feel very rigid as Amplify has been designed as a one-size-fits-all backend solution to your application.

The process of connecting our frontend to the existing tables used by our Slack app consisted of:

  • Writing custom velocity template resolver files for our API requests
  • Modifying a file called CustomResources.json - basically a huge Cloudformation file
  • Manually creating GraphQL schemas to match the data we had in Dynamo

Some of this was an arduous process, especially for new graduates that had little cloud experience and had probably never heard of a velocity template in their lives.

Updating specific strings in the JSON file that need to be linked to other areas in the same file and then trying to push changes, only to realise that you made a typo on some string on line 1264 was painful.

Multiple AWS Accounts

Our application had 2 separate AWS accounts - one for staging and one for production.

Whilst you can create multiple environments under the same Amplify app, it was not a fun experience trying to develop Amplify across two different accounts.

The main reason for this was that both apps had different unique IDs, so when developers would be pulling and pushing changes from Amplify, they would often run into config drift between the two apps. As you can imagine, it caused a lot of frustration trying to check out the correct app in your local repository.

Often times we had to resort to just blowing away our amplify folder and doing a fresh pull from the account that we wanted.

Large Complex Applications

With one of the main benefits of Amplify being that it does a lot of the heavy lifting for you, this can also end up being its downfall for large, more complex projects. While it can handle scalability quite well, projects which require extensive customisation and control over their architecture will probably require additional tools outside of Amplify to get the job done.

Complex Pricing Model

Another pain point with AWS Amplify is its complex pricing. AWS Amplify’s pricing can be difficult to understand, especially for developers who are not familiar with AWS pricing models. The pricing structure is based on a combination of usage metrics, such as monthly active users and data storage, and can be affected by various factors such as the number of API calls and the amount of data transferred. This complexity can lead to unexpected costs and make it difficult to estimate project budgets.

Would I recommend Amplify to others?

The short answer is: it depends.

All frameworks come with their share of benefits and drawbacks. Amplify lets you move fast at the cost of flexibility, and flexibility becomes more important as your system grows in complexity. This makes Amplify an ideal candidate for early stage prototypes or simplistic systems.

If you’re a solo developer working on a small, greenfield project, then Amplify can be a great choice. Just make sure you fully understand the pricing before jumping into it so you don’t rack up too many unexpected costs. The capability to spin up backend services and have them automatically hooked up to your app instantly is a great feature and a good time saver.

On the other hand, if you’re working in a team across multiple AWS accounts with existing services that you want to integrate, I’d say maybe hold off for now.

They have recently introduced Javascript resolvers which means saying goodbye to the velocity templates at some point, so the product is definitely improving.

All in all Amplify is a nice framework and as long as it continues to evolve we’ll definitely see its usage increase in months and years to come.

Article By
blog author

Dylan Longlands

Software Engineer