In the old world of compute, you really only had virtual machines, which Lynn still finds to be an opportunity area for a lot of her customers and encourages you to start there. In the new world of compute, you have this menu of compute that you can have at your disposal. In this video Lynn Langit will help you think about the cost benefit of AWS architecture so that you can pick the best set of Amazon compute services for your particular solution.
- [Voiceover] All right, you've got your instance in EC2, and just for fun let's use our aws-shell. Inside of here, we're going to type "ec2," and notice it lists the different commands that we can work with. I'm going to type "Describe-instances," and it explains on the bottom, the different ec2 commands. We can see that the instance that we just set up has a whole bunch of metadata associated with it.
See, there's the key name "demo." My point in showing you this is that when you are working with ec2, all of these values matter, and see there's a lot of them. If you don't know what something is, you should look it up and make sure it's the value that you need for your particular solution. Now, speaking of the solution, we were talking about compute, and I started with ec2, because I really just wanted to emphasize that even though everybody knows ec2, what I find is that people really don't know ec2, and they use it in too casual of a way, and they end up wasting money.
Speaking of money around compute, I mentioned, also previously, that we now have some other possibilities there. We have Beanstalk and we have Lambda. As we are starting to think about our solution, what is a great practice is if we can use tools to start to document our minimum viable architecture. I'm going to show you a couple resources, and then I'm going to start us drawing. In the Amazon Architecture Center, there are icons.
You can basically pick your preferred method of drawing. Some of you will prefer PowerPoint. Some of you will prefer VIZIO. I like to use these online drawing tools. Now some of them, there's a charge associated with them, but draw.io has a good diagram editor that is free, so we're going to use that to get started. We're going to call this "02 03," and we're going to look in "Compute." If you pass your mouse over the different items, you can see that they are the compute items and the items that connect to compute.
For example, this is an ec2 elastic IP, which is a weird name, because this actually means a static IP address, which you might need for the front of your website, because the world has to connect to it, for example. If you go through, here's ec2 instances. Here's our container service, registry, spot instance, just talked about that, optimized instance, c3 is a type of an instance. Here's Beanstalk, Beanstalk application, Beanstalk deployment, Elastic Load Balancing, and Lambda.
In terms of our website, it's really, really common to start with the most lightweight thing. That would be a Lambda. I'm going to drag a Lambda on here, and a Lambda if you recall is just code. You just literally upload your code as a zip file, and we'll be actually working on this as an example later in this course, and then Amazon manages all the underlying actual machines, virtual machines, containers, and so on and so forth. I recommend it as a starting point. Why you would use it is cheap, fast, and easy to scale.
You need test it. If you didn't want to use Lambda, the next managed level would be Beanstalk. This is a Beanstalk application, and what that is, that can either be a managed set of instances, or you can use the docker containers with it. Now, if you use Docker, than you have to have the elastic container service, because you're going to have multiple Beanstalk instances.
That's really why you would use it, because you intend to scale based on demand. Hopefully, all of us that are making website for a business purpose, we want it to scale so you would use that. It's really, really common to have this kind of an architecture, where you have maybe some lightweight services in Lamba, because they're so cheap. To give you again some perspective on this, Lambda can be 1/100 of the price of ec2. It really can be worthwhile to investigate it for lightweight services. What's an example of a lightweight service? Maybe you're interacting with a database, and you want something to happen when a certain kind of data goes into that database.
You want to send it off to S3 for storage or somewhere else for processing. You can think of it almost like a database trigger in a way. Some single set of functionality is really the common case. Now, here I've got Beanstalk for compute, and I have Lambda. Realistically, you often also still have some ec2. I'm going to pull on an ec2 instance or two. The learning in this is that in the old world of compute, you really just had virtual machines, and you set up your virtual machines properly, which I still find to be an opportunity area for a lot of my customers, and you should always start there.
In the new world of compute, you have this menu of compute that you can have at your disposal, and you want to really think about the cost benefit. Of course, when you're looking at an architecture like this, you might say, "Whoa, that's overkill. "I just have simple website that's doing "a small set of functionality, and I really don't need "all this, and maybe I'll remove the Beanstalk "and just throw a Lambda or two on here." The point is, you want to go through this decision process so you can pick the best set of Amazon compute services for your particular solution.
You might also have to actually write some code, try some things out, see what works, see what doesn't, see if you run into issues like my team did with the ecma script issue for Lambda, because there's all kinds of little proclivities around these services that you will only find out if you actually code up little POCs, but you want to start really considering all these services and then eliminate them as they no longer fit in your particular architecture.
Starting with top-level categories of storage, data, computer, and services, Lynn guides you through planning your ideal AWS architecture, providing service demos using the AWS Console, command-line interface, and other tools. Learn when to use which service for which business case, such as Docker or Lambda or DynamoDB or Aurora? She shows how to script creation of services such as S3 buckets and EC2 instances, create and populate a managed data warehouse, and develop a data processing pipeline that works for you. Chapter 6 covers the AWS Internet of Things (IoT) services.
These exercises can help you build proof-of-concepts, minimum viable products, and deployable solutions to scale and support big data initiatives at your company.
- Setting up your AWS account
- Using AWS tools
- Defining your minimum viable products
- Choosing computer, storage, and data services
- Using S3, EC2, or Docker for website hosting
- Developing an AWS website
- Using a data warehouse
- Developing a data processing pipeline
- Developing an Internet of Things project with AWS