From the course: Shared Economy for iOS Development

AWS Amplify - iOS Tutorial

From the course: Shared Economy for iOS Development

Start my 1-month free trial

AWS Amplify

- [Instructor] So, we've talked about building our app and our user interface. Before we get too far into that, we want to get things configured for it to talk to the server, and for that we're going to use Amplify. Amplify is a great tool from AWS to configure the backend for various mobile and web apps. It can quickly configure AWS for user authorization, APIs, both RESTful and GraphQL, S3 buckets, and more. The command line interface can be a little intimidating at first, or at least it was for me. I like to see what's going on, clicking on things and moving around. But with the command line, it's a little different. The output from the command line can point you to where things are happening on AWS, and you can comb through that. I did that, and pretty soon I began to trust it, and now on some projects I get really far down the road before I realize I haven't even gone to the AWS dashboards. To get started, go to aws.amazon.com/amplify. And for more detailed information on how to use Amplify, I suggest looking up the courses on Amplify. When we load the page we see this nice orange button that says Get Started. So, we'll click on that 'cause we want to get started. And down here we see we want to Install the CLI. So, we're going to run this npm installation, and then we're going to run amplify configure. So, I'm going to copy this, and then go to the terminal and run it. If npm is not installed on your computer, you can go to npmjs.com/get-npm. You scroll down, you have this download button right here, you can download for the current version, and then once it's downloaded, you can double-click on it to install. Go through the installation process as normal. And just like that, it's installed. Now, back into the terminal, we should be able to install the CLI. If you get errors like this, you might need to run npm install with the sudo option. Once it's installed, we can configure Amplify for our system. So, we run amplify configure. Now, we have to login to our account, which we already are, so, we can go right back to the terminal. See, it tells us to login there if we weren't already, and then come back and press Enter. We can tell it which region, and if we look at the browser again, we can see that we're us-east-2. So, we want to use the arrow keys, select us-east-2, and then we can specify a user for this Amplify to use, and we can give it our own name, and I'm going to name it amplifyuser. It takes us back to the IAM Management console where we can finish creating this user. So, you notice it has the name we typed in, Programmatic access, 'cause that's how we're going to be using it, you could also add Console access, but we don't really need that. So, I'm going to go to Permissions, I'm just going to let it select whatever it wants, I don't need any tags for it, review, Create user. Then, once again go back to terminal, and hit Enter to continue. Now, it's going to ask us about the Access key that we newly created, so, we have to get that from the browser. The Access key is right here, we can double-click and copy that, paste it, and then the Secret access key. Shh, it's a secret. Paste that in here, and then we can pick our profile name, we'll just use default. And we're done. So, now we've setup our system to use Amplify, but not specifically our app, and we'll do that next.

Contents