Transcript from the "Publishing Your Application" Lesson
>> Steve Kinney: There is one more thing we need to do to make this for realzies. Anyone know what that is? What's the problem with my application right now? Where do I have to go to get it?
>> Student: It's on Logohost.
>> Steve Kinney: Logohost, if I'm on the go and someone wrongs me, how am I gonna deal with that?
[00:00:19] How am I gonna record that infraction? All right this needs to go to the Internet before it's really reals. So enter awsmobile publish. And this is going to first push up any backend changes that I made, cuz that's important. And then it's going to build my react app.
[00:00:39] And then it's going to take that build react app and move it to an S3 bucket in Amazon. And then it's gonna take that origin source and put it behind a CDN distributed around the world, right? Because I picked USC one. We discussed earlier that's Northern Virginia. Right, if I was in DC, super quick to get to.
[00:01:00] Jersey, not bad either. Here, pretty fast. Sydney, Melbourne, that's gonna be a lot like speed of light. There are physical limitations to how fast you can get to stuff on the Internet. So rather than trying to guess, well, actually all my users are actually in Bangalore. So what I'm gonna do is I'm gonna put it in India, and then, no, don't do that.
[00:01:21] The trick is just put your app everywhere, right? And so with the CloudFront CDN, you basically distribute it to 77 and growing, hopefully like my suspicion is in a month that number will already be old, which is great. Places around the world and then basically all of your users go to wherever this is closest.
[00:01:39] We actually did this at our clients up at Sun Grid. Originally it was hosted out of Chicago and we saw that our response time before somebody in China even got the first byte. We noticed that despite the fact, I’ll tell you a little site secret, is that we don’t even know how to take non-American dollars but we still have an eighth of our customers in India.
[00:01:57] They would have to go all the way to Chicago to even figure out what the first byte of the HTML page was. So by switching that at the CloudFront you can see huge performance gains really quickly simply by taking the web page and moving it closer to them, physically.
[00:02:12] That seems like the most silliest thing but I'm gonna take it and I'm just gonna move it closer to you and now you get it faster. Cool, so now we've pushed everything up. Let's take a look. I was busy talking. We're retreiving, I think we're still building the back end.
[00:02:29] Right, this is gonna be distributed on S3 via CloudFront and we see a bunch of kind of interesting stuff. All of this is configured for us, all right. Another course that we're gonna do at one point is a whole thing about okay, so I actually have an application, and I wanna do all this AWS infrastructure by hand.
[00:02:45] And that is a workshop in and of itself, right. It takes a lot of time, configurage, and tweaking. Here, we're gonna get a pretty solid configuration right out of the box. I actually looked at the CloudFront distribution that was made, and it was almost identical to the one I spent the better part of a day tweaking by hand, which makes you feel really great and warm inside.
[00:03:08] And the thing is too, I could literally spin up a CloudFront distribution using Mobile Hub, and then go take and use it for some different app. Or even copy those settings, so it's also a great way if you're trying to figure out what is a thing that I do.
[00:03:21] So here it is on S3 and we can go ahead and we'll say hello and now I have to play the game of remembering my password from earlier.
>> Steve Kinney: Hey, there it is and you can see my data's already synced. This is the same day that I was working with a development.
[00:03:41] So I was basically working on the production back end as I was going along. Here it is. It's in production. That is a real website that I can hit. If you don't like that one, there's also a CloudFront one which is shorter but equally as hard to remember.
[00:03:55] That'll work for you. The CloudFront one is obviously better cuz it's distributed globally. Also it has HTTPS by default because this is very sensitive information. We would like to encrypt it over the wire. Amazon, well you can actually register domain names in Route 53 through the middle and also get free SSL certs.
[00:04:13] So if you register through Amazon Route 53 there's just a button that says generate me a certificate. And then you go into CloudFront, and you hit a drop down, and then you put it, and you're good to go. That's another course that we'll do one day. So here's my application.
[00:04:29] It's deployed, it's in production, it has got a back end, I did very little work. As you saw, just basically adding the API endpoints but all of our infrastructure was built for us. And again, this is weapons grade infrastructure, right, this is serious, and I know DB can scale, right?
[00:04:46] That is a known factor, but this is bulletproof authentication. This has a user dashboard, this has all of these things in place.