Amazon Web Services, or AWS, allows you to create a free account. Not all services are free but many are either free for a limited time or have limitations in some other way. However, the creation is free and depending on which services you use it may or may not cost. Also, some free services may create things that cost.
- [Instructor] The first thing I want to do is talk about a few of the concepts that we're going to be dealing with in this course. Of course we're going to be using AWS and I wanted to look up how to see exactly how they define themselves and I found a website that defined AWS as, "It is a secure cloud services platform," which is great, we want cloud services and we certainly want it to be secure, "offering compute power," so functionality, "database storage." Of course we'll be using Dynamo DB here, but there's also relational databases. "Content delivery," great things like CloudFront and hosting and S3 buckets, "and other functionality to help businesses scale and grow." Got to throw in that marketing for scaling and growing because everybody wants to be successful.
The service we specifically want to look at in this course is AppSync. AppSync is presented as a service that helps you with handling securely, "all the application management tasks" "like online and offline data access," "data synchronization, and data manipulation" "across multiple data sources," and its URL's at the bottom as well. So what AppSync is going to do for us is allow us to store our data from an app on the server but also synchronize it. There's a lot of other things you can do, but at its core that's what we want it to be able to do, store the data and sync it across the different installations of our app.
We're going to be using Amplify in this course. Specifically the Command Line Interface to add all the functionality and configuration to AWS. We'll still inspect what it creates on AWS so we can see what's going on in the background, but it's going to do a lot of the legwork for us so we don't have to jump around from one page to the next and click all over the place. So let's look at these a little bit. First I'm going to go to the AWS website and here's the basic landing page for AWS. You notice it has the products listing here, the different categories, and all the different services and features.
Also the price, and we'll be using the free tier services, but some of the things that you can get into in these services can cost, so you might want to be careful about that. Another thing you'll notice with AWS is they love to list their services and features in a variety of different ways and categories and they're very proud of them as they should be. Looking specifically again at the pricing, let's go to the free tier. You can see that there's a lot of different services that are free. Some are time based, as you can see here, the 12 months free. Some are always free.
So be mindful of that. Later on at the end of this course we're going to look at cleaning up anything that we create so you shouldn't be charged for anything, but always be careful what you're creating. The other thing you want to do once you've created your free account is to sign into the console. The console lists, again, all of the different services and features that are categorized and you can also search on them. You can see your latest used ones up here and we're going to be primarily concerned with AppSync, which uses a lot of other services. So let's go there now.
So here's AppSync. It allows you to create APIs for your app, be able to upload, download data, and keep it all synchronized. This is the type of thing we're going to be dealing with in this project, but there's a few things we need to do before we can dive in. There's three primary things we need to install first. The first is NPM, that's what we'll use to install Amplify Command Line Interface and then also CocoaPods for our iOS app. So to install NPM we need to install Node.js. We can get there from npmjs.com or going to straight to nodejs.org.
So let's go there now. Here you can see the installation for Node.js. I'll just click here, the recommended one for most users. It's downloaded. Whoops, downloaded it twice, but that was fast. Once it's downloaded, I can double click on it in the Finder or from the browser where I downloaded it and click Continue to install it. Agree with the software license agreement and continue. Once it's installed, it'll even delete itself. Now we need to install the Amplify Command Line Interface.
We'll do that from a terminal. In the terminal we'll simply type sudo npm install with the global flag at AWS dash Amplify slash CLI and I'm going to specify the version. At this time the latest version is 0.1.34. I'll put in my password and now it's installed and the last thing we need to install is CocoaPods. We can do that here as well with sudo gem install CocoaPods.
And that's everything we need to install for now. Assuming you have Xcode for your project, we should be set and we can start developing our app.
- Preparing to use AppSync in code
- Updating settings and the schema
- Adding a second data source
- Storing posts online
- Updating subscriptions in schema
- Testing live updates
- Handling updated posts
- Offline capabilities