What is AWS Amplify? Pros and Cons?
Hello everyone in this blog. I'm going to be introducing you to AWS (Amazon Web Services) amplify if you're struggling trying to figure out whether Amplify is the right tool for your new project, then this is the blog for you You're gonna learn what amplify is how it works and some pros and cons of using it.
So let's get started So first of all, let's just start with what AWS amplifies now. AWS amplify is what I would consider a glue service that helps you build entire apps quickly This can range from front ends to back ends to full stack applications And there's a whole bunch of different options with different technologies that are available to you So for example, here are some of the different options if you're building a full stack application If you're using this for a web application then JavaScript react or angular or obvious choices If you're using amplify for a mobile application react native Android and iOS or some other good options.
Now amplify is primarily used as a CLI or a command line interface tool But there is a limited feature UI that allows you to do some administration tasks for some day-to-day activities Now the cool thing about amplify is that it allows you to quickly add things like storage Authentication things like monitoring and pub-sub now you don't need to know what amplifies is provisioning behind the scenes.
So for example, if you add something like storage, you may be provisioning a resource from an AWS service without actually knowing about it I think Amplify is attractive because it focuses on delivering the functionality Instead of relying on you having to know what AWS service to use to achieve that functionality Now this may seem magical, but there's not a lot of mystery to how to amplify does all these things because behind the scenes It's just cloud formation Cloud formation is an infrastructure as code solution from AWS and it allows you to write code to deploy your infrastructure out to the cloud. It's just cloud formation in terms of demystifying some of those different services that are at play here Let's take a look at a simple example.
So there's a whole bunch of different functionalities that are offered that you can add to your application Through a simple CLI command things like authentication Data store managed hosting managed users and a whole bunch of other things that you can see here This is a really impressive list of things that you can easily do with AWS amplify But behind the scenes, there's no mystery here So things like functions for example are really creating AWS Lambda functions to run your code for data store Really you're using Amazon DynamoDB for authentication Amazon Cognito for APIs You use a combination of AppSync and API Gateway for storage S3 for pub subs simple notification service or SNS For analytics pinpoint for custom domains rel 53 and for monitoring, of course Amazon CloudWatch I'm not gonna go through all of them here But you can get an idea of what amplifies actually doing They're just a layer on top of the complexity that makes your life a whole lot easier now in terms of actually using amplify.
How do we go about doing that?
Well, there are two ways, but primarily you're gonna be interacting through the CLI.
So what does that look like?
Well, you really just need to configure a project using amplify configure You follow the wizard and fill out some simple things and then you can start adding your functionalities So a simple one is just to add an API Running the amplify add API command will launch a wizard where it asks you a whole bunch of different details about the API that you want to create Things like the technology whether it's GraphQL arrest the name some API keys and a bunch of other details that apply to an API Since you're running this through the CLI a whole bunch of application code will be added to your project folder.
So you can start making changes to your APIs directly through your editor Once you're satisfied You can run a deploy command and finally what amplify will do is launch all that delicious code into the cloud on AWS And it'll result in the API gateway in a lambda function combination to host your API So the CLI is the primary option But like I said, there is an administration UI that you can use to interact with amplify as well now the admin UI is very pretty.
I won't deny that it's got a lot of useful features here that you can see and at the bottom there It shows you the history of the cloud formation templates being updated. There are some useful things here in the UI So for example the data model section allows you to use a studio-style editor where you can drag and drop things and create data Models that you can quickly import into your project as model files in your language of choice.
You can also do things like add relationships between your data types and amplify behind the scenes to create the right indexes in your data store. To respect those relationships and that's among many of some super neat features that are available through the admin UI You can come here and explore this but anything that you can usually do through the admin UI. You can do it through the CLI anyway. It's just a place to come to get a visual for what you're creating in the back end And finally, if you're struggling to decide between amplify and something else then I hope this pros and cons list will help you out a bit. So starting with the pros.
What does amplify good for?
Well, it's good for getting started quickly Using this CLI and setting everything up is super easy And you can run some commands that let you launch some pretty interesting projects with a whole bunch of infrastructure behind the scenes. So it lets you hit the ground running along the same lines It's also great for prototyping. So if you want to build something out quickly by trying a new technology that you've never touched before Then Amplify is great for you. You can continuously experiment and throw away your work if you're not satisfied Thirdly, it allows for some very fast development cycles It's very quick to add new functionality like an API or a database Realize that it's not useful anymore and then quickly tear it down with a single command There's no commitment to the infrastructure you're creating because it's so easy to remove it And finally it shields you from the complexity of AWS services This is where a lot of people get stuck when they're on their cloud journey learning AWS. There are so many different services that do so many different things and like I said amplify really focuses on the functionality Instead of the underlying service that powers that functionality.
So it's great because it helps you do a whole bunch of interesting things without having to know what's going on under the hood Now that last point is a pro But it's also my first con you don't learn about AWS services And this is a really big deal because if you're using amplify thinking that you're gonna get a lot of experience with AWS And that's probably not what's gonna happen. You're just gonna get good at using amplify and not much else You won't realize what's going on with AWS until there's a problem and you need to go figure it out by that time It's too late and you're probably gonna be overwhelmed with all the complexity that you need to navigate second collaboration can be frustrating This can be an issue because among multiple teams you're all having to share the same back end Now there are some ways around this and AWS does have some workflows that make this a lot easier But it's still something that was frustrating for me when I was first getting started try and own amplify third You can't really go outside the box.
So if there's something that you need that's offered through AWS But isn't supported by AWS Amplify then you're kind of out of luck This interrupts your workflow if you're using Amplify a lot It sucks having to do 99% of things as part of amplify and 1% of things having to go into the console and doing it yourself Now there may be a way around this But it wasn't clear from the documentation and it may be difficult for beginners to the AWS ecosystem And finally the thing that scares me the most about amplify is the potential for surprise bills Now like I said amplify will provision things behind the scenes without you necessarily knowing if you do something like add authentication.
For example, you're adding a cognitive user pool and some fees are associated with that. So you need to know what the implications are of running different commands I don't want anyone to get a surprise bill because that's not good for anyone Now I should mention that Amplify primarily uses serverless technologies such as DynamoDB, AWS Lambda and some other services. These services are primarily on a pay-per-use model. So it's not too much of a concern However, there is a chance that if you add things without really realizing what's going on behind the scenes You can get a surprise bill. So at the very minimum set up a billing alert so you can get notified quickly and tear down your application if something unexpected happens. Thanks for reading this blog.
Subscribe to my newsletter
Read articles from Sumi Sangar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Sumi Sangar
Sumi Sangar
Software Engineer with more than 10 years of experience in Software Development. I have a knowledge of several programming languages and a Full Stack profile building custom software (with a strong background in Frontend techniques & technologies) for different industries and clients; and lately a deep interest in Data Science, Machine Learning & AI. Experienced in leading small teams and as a sole contributor. Joints easily to production processes and is very collaborative in working in multidisciplinary teams.