 Before I get started, let me just point out a few people. I have one of my offspring here with me, so Stefan, if you just want to wave. And then I brought a big gun because I'm starting my journey with AWS, but a friend of mine, Craig, he works for Amazon, so any question I cannot answer, I'm sure he will be able to do that. And that's the rest of the family, so I pointed out Stefan, you know, he's the one on the left, and that's me on the right, and then my other son, Josh, and my daughter, and my wife. And we love the countryside, so we live way out west on a piece of property, and we live in my wife's dream. She loves horses, so I'm funding her addiction. And that's the cool thing about the internet technology, is you can live and work anywhere. Yes? Okay, what we're going to cover today, first of all, let me do a bit of a check in terms of knowledge. Who has never logged into the AWS console? Okay, good. Who has logged in and deployed thousands of AWS instances? Craig, yeah, you should raise your hand. Okay, one? One instance? Okay, good. So this is not a deep dive, you know, going into AWS. This is really getting people to understand what AWS is all about, and how to spin up WordPress. I'm going to show you two ways. I'm a little bit bummed that the screen is so cramped, but I'm sure we can get through that. So I'm going to show you two ways to do that. AWS is really phenomenal for high availability and also allows you to very rapidly scale your environment. So a lot of the people at WordCamp, they're probably pretty good with having WordPress on a shared host somewhere, but if you need more host power and you want to be able to scale your WordPress site very quickly, then AWS is a great place to do that. I'm not going to go into, you know, Cloud Wars, you know, AWS versus Azure or Google or RaxCase or whatever. This focus is on AWS. We are also not in this session going to set up, you know, S3 and Cloud Front and talking about caching. But if we have some time at the end and people have questions about that, we can do it. So we're going to do a quick overview of what AWS is all about, and then we're going to jump in and have some fun doing live demos, live demos. Who's done live demos? That's always scary. We had the workshop Friday, and we provide 180 WordPress instances on AWS for the beginner's workshop, and it actually went well. The internet was a bit spotty, but the performance of the WordPress sites were pretty good. Okay. Who uses Netflix? It's got a Netflix account. Okay, so then you are running AWS because Netflix runs on AWS. I mean, the AWS story is actually a pretty interesting story because it was a bookseller, Amazon, and at some point they realized, well, we need a pretty substantial infrastructure to run our little bookstore online. And they started developing technology to be able to very rapidly deploy changes to Amazon.com. And at some point they realized, but we have a lot of capacity. Let's make it accessible to other people and start selling these services to other companies. So about 10 years ago, that started happening, and now many, many large companies and smaller startups are running on Amazon Web Services, AWS. So Dropcam, AirBnb, Slack, I'm sure almost all the services that you touch on the internet has some interaction with AWS. And if you really start to research what's going on, you know, that's a very intriguing story. And I think they caught a lot of the big technology companies off guard because a bookseller you know, providing technology, it doesn't compute because they way ahead of Google Rackspace. Microsoft is probably the only cloud provider that's close in terms of what they provide. So just a very interesting story. And then it's a full platform. It's actually a little bit overwhelming. I'll show you a screen just now. But anybody can use it. If you have a credit card and you sign up, you can use the service. Okay, let's quickly touch on a couple of AWS services. So as you can see, it's extremely there are a lot, lots of services. And I would lie if I say I know, you know, each of these. Most of you are familiar with S3. So if you if you want to back up your WordPress site, there are a lot of plugins that provide backup facilities to S3. So most people are familiar with that. So that's a durable object store in the cloud. EC2 is what we're going to focus on elastic compute cloud that allows you to store or to spin up virtual machines in the cloud very quickly. And we'll be doing I'll be showing you how to do that in two cases. Cloud front is the Amazon content delivery network. Has anybody use cloud front as a CDN? Okay. RDS is also a very cool service. One of our sponsors deep SQL they provide a similar service. But this is a service that allows you to run a database without having to worry about managing updates, backups, you know, high availability. It's a very cool service. And you can run my SQL Oracle SQL server. And then Amazon provides their own my SQL compatible database called Aurora. That's very fast, 10 times faster than my SQL. So that's if you start to think about high availability and WordPress for much larger organizations, you want to have a managed database server service. Route 53, that's your DNS. That's where you can these days you can actually register domains with Amazon. And you can also use the DNS for your own domains. CloudWatch and CloudTrail, those are two services that allows you to monitor your Amazon instances. And if something goes wrong, you can get it alert on your phone, SMS, email, all kinds of endpoints, but you know, typically email and SMS. And then, you know, interesting how things are happening around enterprise applications. But recently, Amazon also announced work mail. So obviously a competitor to Gmail and all the other email services. So you guys use that internally, great. No comment. Okay, so let's jump into some fun WordPress stuff. Who has just the amazon.com account where you buy stuff from Amazon? Okay, maybe I should ask who doesn't have an amazon.com account. Okay, good. So if you have an amazon.com account, you can use that. There's a few extra steps that you have to perform. So to be able to set up an AWS account, you can use your Amazon.com account. But then you have to provide some more information, you know, contact information, address, and you have to give them your credit card because Amazon services, Amazon AWS services are billed by the hour. They send you an invoice at the end of the month. They didn't bill you as you use it. But still, you have to provide your credit card and they will, you can say how they verify you. They can call you or send you an email. And then you have your AWS account. It's actually pretty easy to set it up. So as I mentioned before, I'm going to show you two ways to spin up WordPress the easy way and then a little bit harder way just for the fun of it. So let's jump into the easy way. In AWS, there's a place called the marketplace. It's like an app store. The marketplace is where companies provide pre-packaged virtual machines. So Bitnami is one company that provide a pre-packaged server and it includes LAMPstack. Anybody know LAMPstack? Linux, Apache, MySQL, PHP. So they package all of that already for you, pre-configured, and then they also put WordPress on top of it. So in this case, we're going to go into the marketplace, you know, go through a couple of steps and click launch and it will spin up LAMPstack with WordPress on top of it for you. So let's do that. And I'm going to jump to my AWS environment. Now I thought it would be a little bit larger. Let me just see if I can change the screen size. Are you? It almost looks like my iPhone. Better? Okay. So in this environment, let me go back to the dashboard quickly. You can see we still have the 180 instances we spun up for the workshop on Friday. So how do we do this? So I've got a big blue button, click instance. What I'm going to do is I'm going to go through this fairly quickly because it takes about five minutes for the instance to spin up. So while that's happening in the background, I'll slowly walk you through what we did. So there's the AWS marketplace. You just search for WordPress. And we're going to pick this pre-packaged Bitnami package and just click select. As soon as you sign up with Amazon, you get a free tier. So we're going to use the free tier, which is a okay configuration for WordPress. Everything in Amazon will be added to a virtual private cloud. So all the security that you need is already pre-configured for you. So I'm just going to click on next. You get 10 gigabytes of SSD storage included. So I'm just going to do next. And I'm going to give this a name so that we can get it later. I'm just going to save it. The other thing that's really good about this is they pre-configured your security so that you have ports 80, 443, and 22 open. Those are the ports that you need for your web server to work and to SSH into your environment. And we click review. I'm not going to look at this for now. We'll get back to it. You do need to download an SSH key. And I already have one. So I'm not going to download one. I'm just going to pick the one that I've already downloaded. And then magic happens. This is really cool. So now in the background, Amazon is provisioning all the resources needed to spin up a LAMP stack and then to put, you know, it will pull WordPress from the latest archive. And it's busy building that instance for us. So I'm just going to go back to this screen. And it is running. You can see it's pending. So it's busy, you know, provisioning that server. Amazon is split up into regions. So if you, on the east coast, typically you will pick the east coast region. It means your server will be provisioned in a data center in somewhere in northern Virginia. As I mentioned, you go to the marketplace and you search for WordPress. We picked the WordPress powered by Bitnami HVM instance. And it's already got everything you need to run WordPress. As I mentioned before, there's a free tier that you can start with. It's enough for most WordPress installations. And then Amazon does really a lot of work for you. And all days you had to configure all your security yourself. Now they give you a default, what's called a VPC virtual private cloud. So all the security is already provided for you. And you don't have to, you can read this if you want to, but you can just select, you know, next. As I mentioned, you actually get up to 30 gigabytes of free tier for a year storage with Amazon. We just selected 10, that's fine. The next time we're going to do this, I'm going to show you how you open ports. What I really like about AWS Amazon is that they provide their philosophy is everything is closed. You have to explicitly open certain ports. That's a little bit different than the traditional Linux world. Traditional Linux is fairly open and you actually have to close stuff to make it secure. Amazon starts off by saying everything's closed. You open up what you need. So again, this is a pre-configured environment. So they already opened port 80 for us. Everybody knows what you need, why you need port 80. That's where you run HTTP or web browser. And then port 443, that's HTTPS. And then if you want to access the server itself, you typically use FTP or SSH. And that's port 22. Be sure when you download the key that you store it in a place where you can get it because if you don't have that key, you can't access the back end. And then you click launch. So let's go back and see what's going on on the Amazon side. So the instance is already up and running. It's initializing. I'm going to connect an elastic IP. That's like a dedicated IP because with Amazon, you can actually stop your instance. But if you stop it, the IP that it allocates to that can go away. But if you connect the elastic IP, you'll always be able to connect using that IP address. So let's go to elastic IPs. This is all very easy. Click on allocate. Yes, I want to allocate. That's the IP that it provided. Being in the hosting world for many years, this is too easy. But there's a lot more to it. I mean, Amazon is like a big box of Legos. And the way you put those things together to build something, there's still you have to think about it. So they make certain things easy by giving you the blocks, but there's still a lot to be done to make it work well. So we want to associate that address to the instance that we just launched. And that's the one associate. And that's it. So if we go back to our instance, it's all done. So let's find the IP address. That's the IP address that we just allocated. And let's open another browser tab. And there you have your WordPress instance. There's one step that's kind of tricky, that Bitnami, they provided in their documentation. But obviously, how do you log into your WordPress instance? And the user, they always use user, which is better than admin. It's not the greatest, but they use user as the username. And this is a good trick. So to be able to find your password for WP admin, you go to your instance, you click on actions, instance settings, and then you go to your system log. And if you scroll away to the bottom, that's your password. So again, if you don't know this, it's like, where do I find this password? And I think you have to do the right-click copy. So let's go back to our WordPress password. And there we go. Easy enough. And all the slides will be available afterwards, obviously, on the website. So if you want to follow along, you can do that. Okay, so now let me quickly pause there. So there's this slide with the information about how you get your password. Before I move on to that, any questions? Yes. I'm not sure about that. When you can go to the marketplace, search through it. But that one is for a single instance. Next step, if we wanted to configure that a little bit more, I'm sure you might get into this. This is what I'm doing next. Yeah, so that one is sort of, everything is out of the box provided for you. Let me quickly, I'll show you now. Route 53, yes. Some of those preconfigured, they'll show you when you look at the marketplace, they'll show you pricing. This one is free. So you don't pay for the Bitnami service. Obviously, you'll pay for the Amazon resources that you use. Okay, so that was the easy way. So for people that are a little bit more adventurous and for you that want to do your own stuff, this is the way. So what I'm going to do in this one is to build your server stack and then through SSH, install WordPress on that. I'm going to use, Amazon provides a very solid Linux distribution. So I'm going to use that. So we're going to launch an EC2 instance with Amazon Linux. Again, associate an elastic IP so that you can start and stop your instance without losing your IP address. Always after you install a Linux environment, you have to update it. We're going to launch Apache. If you want nginx, you can do that. Then we're going to install and configure PHP and MySQL. Sounds like a lot, but it's a couple of commands and I'll provide them. And then we're going to install, configure, and launch WordPress. So part of this is you sort of see how the sausage gets made. So this is what hosts typically do. Not all of it, I'm not going to give all my secrets away, but you can get a sense of what's going on. Okay, so let's jump back to our console again. And by the way, a lot of this you can do through a command line as well. The console is pretty solid, some Amazon people don't like to use the console. But it's a really easy way to start or to do your work in Amazon Web Services. So your question about nginx, I'm pretty sure, I mean, we can do a quick search. I can never remember how to use, is that how you spell it? Yep, so they are pre-packaged instances that you can use. Or you can just install Linux and then add nginx on top of it. It's your preference. I think the Amazon one is based on, do you know Craig? I can't quickly see it here, but it's based on some distribution. I mean, it's really your preference. And red hat. CentOS? And red hat. And red hat, okay. So in this case, we're starting from scratch. So we're going to start by installing Linux and we're going to use Amazon Linux, obviously. So you saw this before, this next step is to configure your virtual private cloud. And then you add your storage. Let's give it a key again so that we can remember. And typically, I mean, you would add things like app. You give it tagging means it's ways to identify it later on. So this is typically what we would do is we'll say WordPress. And if it's the environment, dev, just to give an idea of how you use that instance. Okay, yeah, we have to add a few things. So in the other one, it already preconfigured all the ports that you needed. With Linux, they by default open port 22. But we also want to open port, which port do we want to open? Okay, so they make it easy for you. They don't, you just click HTTP and there's that port and then HTTPS and that's that port both ways. You can do that as well. But for my example, yeah, it's just for a website. They have to open porch, you know, all those ports. Yes, so again, if you remember, I already have a key and I'm going to show you how I'm using that key in this instance. If you don't have a key, create one in this step, it will download. But let me launch this instance so that it can start doing its magic. Again, every time I hit that launch button, it's almost like sending a space shuttle to somewhere. Do you still get a kick out of that Craig? You do it through the command line, so I'm sure that you don't. So you can see it's pending, so it's starting to spin up the Linux server. So let's go back to our presentation. So we've done the first step, we've launched in a server with Linux, Amazon Linux. As soon as that server is up, we can associate it with a elastic IP. Then we're going to update Linux and, like I say, install Apache, PHP, MySQL, and WordPress. I do want to focus on that again. So be sure when you install Linux, be sure to open the ports so that you can access the browser. The good thing is if you forget, you can go back and open them later. It's not like if you don't do it. But even if you don't do it, the really cool thing about Amazon is, if whatever you did didn't work, shut it down, just terminate it and start over again. Again, in my world, it used to be you build a server, there's a machine, you can actually feel it, you build the server, you put software on top of it, you flip the switch, you hope it runs. If it runs well, you don't touch it. This is a completely different environment. You can plug and play very easily and you don't have to think about throwing away. They talk about throw away instances. So if something didn't work, just throw it away and you can start again. Okay, let's see what's going on on this side. So it's running and I think at this point we can associate our, let's not do that for now. So the way you find out how to connect to that instance is there's a button next to launch instance. You click on that and then it provides you with exactly how you can access SSH into that instance. So the first step is, and I've already done this, but I'm going to do it again, but you need to change your file permissions on this key is the key that you use to SSH into your instance. So let me open my terminal window. So let's just make sure I know where I'm at. I think I need to be Dropbox. This is my, so you can see my key. So let's just make sure the permissions are set for that file. And if this is freaking out, you're out at this moment. Good, but it is a lot of fun and all the steps are included. I would really encourage people that have never done this before, try it. You know, you'll kind of get addicted to it. So be careful. But then again, Amazon makes it really easy. It gives you exactly the command that you need to run to access that server. So I'm just going to copy that, paste it in my terminal window. Yes. Yes. And now we have access to our Amazon Linux server running in the Amazon Cloud. So, and again, they make it easy. I'm going to go through these set of commands, but the first thing we have to do is to update, update our Linux instance with all the latest packages and the command you use for that is yum. So it pulls all the packages that it needs from the different places to update your Amazon Linux instance. You don't know you do. Sorry, you do have to use sudo for that. So this is the step that takes the longest because it's basically looking at all the packages that you have on your Linux server and getting the latest versions and updating them. The next step we're going to do is to install and start Apache. Okay, so how do we get to super user mode? It's okay. So now we're in super user mode. And same command, yum install and Apache. So now it's pulling Apache from the server and installing it. But to be able to access your web server, you need to actually start that service. Let me ask you this. So people that have just never done any Linux commands that have a website running, do you have a little bit more appreciation for what the hosts do? But it's cool. Okay, so let's attach elastic IP to this instance. And again, the way you do that is you go to elastic IPs, allocate a new address. Yes, I do want to allocate a new one. And now I want to associate it with that Linux instance that we have running. And what did I, WP2, yep, that's the one. So let me ask you this. How would I know that I've correctly configured Apache? How would I be able to test that? Okay, so yes. So we have the IP, yes. So let's copy that. And if we paste it, we should see, we should see, yeah, so. So that means we have Amazon Linux running. We've started the Apache server. So what else do we need to run WordPress? We need MySQL and PHP, and then obviously WordPress as well. But this is a good way to test. So at least we know our server is up and running. We've installed Apache and it's up and running. So we head back to our terminal. And by now you're probably familiar with, you're probably familiar with everything working, but it's not. This is interesting. My terminal just died. Well, let's start again. Is that better? Okay, so again, we have to SSH into that one. I think, let me just make sure that's the one. I'm going to go back and just get that URL again because I've obviously done this many times, so I don't want to do the wrong one. Okay, permission denied, wonderful. Many refreshments. Yeah, you've assigned an elastic IP, so you need to connect to that. Well, I'm using the DNS. Okay, so let's get back. So I'm back into my Amazon server. I use the DNS, so I mean, if you have the DNS, you don't have to reference the IP. Mr. Amazon, we can discuss it afterwards. Okay, so again, we've installed Apache, Linux Apache, and now we need to install MySQL and PHP. And all of this is in my slide, so you guys can benefit from all the hours and hours that I put into creating this for you. So again, these commands are a little bit boring, but we have to go through them, so now we're installing MySQL, and then we need to start the MySQL service, and after we've started it, we need to create a database for our WordPress. Everybody knows that WordPress runs on a database, so you need a MySQL database. So let's create the user and the database. So I'm going to call mine WCATL blog, and then there's also a really nice command that allows you to secure MySQL because obviously it's a very important database, so set root password, yes. You wanna know my password? I don't know my password. And then the rest is just, yes, yes, yes. Very easy. My password's in my slide, so you can get it. What do we need to do now? Now that we have, yes, so now we have to get WordPress, and Apache servers, you have to install WordPress in your home directory, and the home directory for Apache is under var, dub, dub, dub, HTML. There's nothing at the moment. Do you know how to get WordPress? So WordPress is so nice to store the latest version of WordPress at this reference, and now we are pulling all everything that we need for WordPress, yes. It's local, no, yes. And if you, yeah, we can talk some more about it afterwards. So now we have all the Amazon files, but obviously we have to untar it. And that means, so latest, tar, cool. We have all our Amazon files. I'm going to move those files to a sub directory that I'm calling that, wcatlblog. Let me just make sure, yep. And to make sure that's actually what I did, let's navigate to that directory and that we have our familiar WordPress files. Okay, what do we need to do now? We created our database, so we need to connect that to our WordPress system. And WordPress comes by default, it comes with a sample WP conflict, WP config file, if I can spell. So WP config, so we're just making that available. So, and to weigh, how many of you guys have used VI? Okay, okay, so Nino is a little bit more friendly, but so we need to configure our WP config file because we have to connect it to our SQL database that we just created. So let's scroll down, makes it fairly easy. Remember we created the database and that database is wcatlblog. We created root as the user and guess what? You can see my password. Yeah, that's secure. Obviously this is a demo. If you're going to use Amazon's RDS, so the managed database server, they will provide you with an endpoint there. And so instead of having local hosts, you can just paste it in there and then it connects to the managed database. So let's save that. Okay, we do need to restart Apache for all of this to take effect. And HTTP, D restart. Okay, so the moment of truth. What do you think? Do you think we did everything right? Okay. I'm having fun. I'm not sure about you guys. Okay, so that's our Apache page. Remember I installed WordPress on slash wcatlblog. So to finish this, we need to go to, I love the way they do it these days with if you don't provide a strong password, there's a checkbox to say, I agree, not something like that. Let's confirm use of sweet person. Let's not make WordPress mad. We don't want it indexed. So there we go. So we have our, so in this case, we, you know, within a couple of minutes, you were able to spin up the Linux environment, install Apache, MySQL, PHP, get all the WordPress files, configure those WordPress files and you have your WordPress instance running. Pretty cool. We have two minutes. So I was, if we didn't have time, I wouldn't do this step, but I think we have time. So let me show you how you would actually now, I do need to save. Yeah, let's do it. So I just want to save my password. Should never do that. Should use last pass. So how do we actually use a domain versus an IP? So the way you do that is to use route 53 to associate your IP to a domain. So as luck would have it, I've got some domains lying around. So let's just use this one. We create a record set. Where did I go to, oh, create. There we go. No, no. Why don't I see that, Craig? What am I missing on the record sets? There we go. So we're creating an A record. So to point the domain to our IP. So let me just make sure I get the right one. So that's the A record that we're using. Just the IP, not the HTTP. So it may take a little bit of time, but let's see if we were able to do that correctly. So that is my one. And obviously, if you remember, I installed it on a sub directory. Obviously, the next step is to go into, let's do that quickly. Let me get my strong password. Where do we set our URL? Obviously, we need to change it because we installed it on an IP. And I always forget that you remember the 16.1.net. 16.1.net. It's kind of fun if you break this. Anybody done that? Yes. I think it's fine for the next class. Okay, very good. Thank you, everybody.