Content Domain 3: Cloud Technology and Services
Task Statement 3.3: Identify AWS compute services
Let's get started with the third task statement covering AWS compute services. And we will start with Amazon EC2. Amazon EC2 is virtualization as a service. It is an infrastructure as a service or IaaS product, and it provides so much value to your AWS accounts. Let's pause here and check your fundamentals. What is virtualization? Well, it is running one or more operating systems on a piece of physical hardware known as a server. Each operating system is separate, along with their applications, and also allows multiple different privileged applications to run on that same hardware using software to make their calls. And this virtualization started off with two different designs and then has kept evolving. If you're interested in the history of virtualization, please let me know. I have some content covering virtualization fundamentals. Let's start with the architecture for Amazon EC2. Amazon EC2 is the default AWS compute service. Amazon EC2 instances are virtual machines and EC2 instances run on EC2 hosts which are the physical hardware or physical servers that AWS manages. And the EC2 hosts are either shared or dedicated hosts. Shared hosts are the default for EC2 hosts that are shared among different AWS customers, and the customers do not get any ownership of the host hardware. You pay for your individual instances and resources, but it is important to remember that when you use a shared host, your instance is isolated from other AWS customers. With Dedicated Hosts, you are paying for the entire EC2 host, not just the instances that you run on that host. You do not share it, you pay for the entire host, no matter how many instances you spin up. EC2 instances are an Availability Zone resilient service, because the EC2 hosts sits in an Availability Zone. So if that Availability Zone fails, then the host and the instances running on the host will also fail. Now, EC2 hosts that sit inside an Availability Zone also have local storage called instance store. And the key to understand with instance store is that it is temporary storage. And if your EC2 instance moves off the host to another host, then your storage in the instance store is lost. And for networking, when an EC2 instance is launched into a specific subnet inside your Amazon VPC, a primarily Elastic Network Interface is provisioned into that subnet and it is mapped to the physical hardware of that EC2 host for that Availability Zone. And you can add multiple different Elastic Network Interfaces to your EC2 instances. So let's go back to storage and talk about how EC2 instances can connect to an Elastic Block Store or Amazon EBS. Amazon EBS lets you access volumes of persistent storage. Inside your Amazon VPC, you have a data network set up for your Elastic Network Interfaces, but you also have a storage network to connect to your EBS volumes. Amazon EBS is an Availability Zone resilient service, so you can have different EBS volumes running in different subnets for different EC2 instances, but you cannot connect to EC2 instances to an EBS volume in a different Availability Zone or subnet. For the exam, know that there are different types of EC2 instances and a high-level overview of which instance type would be the best choice for a particular scenario. When you choose and launch an Amazon EC2 instance, you get a raw amount of CPU, memory, local storage, and type of storage. And be aware of the performance for each instance type because with each instance type, you also get storage and network bandwidth. And you need to make sure you have enough bandwidth with the instance type you choose. But we also get resource rations when we choose a particular EC2 instance. And resource rations are simply the amount of resource you get for each raw amount. For example, an instance that is more suitable to compute would give you more CPU and less memory than an instance more suited for memory which would give you more memory and less compute. You also get additional features and capabilities with different instance types like GPU for graphic processing. And a key here and another fundamental to know, your AWS account structure, your goals, and your design so you know which instance type to choose. Amazon EC2 instances are group into five instance categories, and these categories help you select an instance type based on your particular workload. General Purpose is great for default steady state workloads, even resource rations, and should be used as default unless you have specific requirements. Compute Optimized instances are designed for high-performance computing such as media processing, machine learning, gaming, scientific modeling, and so on. The resource rations are usually more CPU than memory and they provide access to higher performance CPUs. Memory Optimized is great for processing large in memory datasets and database workloads. The resource rations are usually more memory than CPU. Accelerated Computing is designed for specific requirements such as hardware GPU and field programmable gate arrays. Storage Optimized is designed for applications using data warehousing, analytic workloads, Elasticsearch, sequel and random I/Os. And then there are EC2 instance types for each of these instance categories. We also have burstable instances. And what happens here is that instances have normal CPU loads that are low and you are given an allocation of burst credits that allows you to burst up and then return to the normal level. These are usually cheaper and a great option. For the exam, know that you can create custom Amazon Machine Images, or AMIs, for your Amazon EC2 instances. A golden AMI is an AMI that contains the latest security patches, software, configuration, and software agents that you need to install for logging, security, maintenance, and performance monitoring. Let's dive a bit deeper. Do you know where to find the Amazon EC2 instance ID, instance profile permissions, and kernel information? Would you check the instance metadata, instance user data, or AMI? Instance metadata is the data about your instance you can use to configure or manage. You can get the instance ID, public key, public IP address, and other information from the instance metadata using http://169.254.169.254/latest/metadata(opens in a new tab) using http://169.254.169.254/latest/meta-data(opens in a new tab) using http://169.254.169.254/latest/meta-data(opens in a new tab) Instance user data is incorrect because this is used to perform common automated configuration tasks and run custom scripts after the instance starts. It doesn't contain any information about the instance ID, public keys, or the public IP address of your EC2 instance Another type of compute is containers. And for the exam, we need to understand what containers are and what benefits container computing provides. The big difference between Amazon EC2 and containers is that the guest operating system on Amazon EC2 instances takes up a lot of space, and those resources are consuming memory and disk space, and this leaves just a little bit of space for the applications. And a lot of these instances are using the same operating system. So there is a lot of resources being consumed, lots of usage, and lots of duplication. Containers are designed to handle it all differently. You have the hardware and you only have one operating system on top of the hardware. Then on top of the operating system is a container engine, and the container runs as a process within the host operating system. So they can use the host operating system for networking and more. Amazon Elastic Container Service, or Amazon ECS, is a service that accepts containers along with instructions on where and how to run those containers. It is an AWS managed container-based compute service that is a container orchestration service. There's also Amazon Kubernetes Service or Amazon EKS that allows you to run AWS powered Kubernetes on Amazon EC2 instances. Another AWS compute service is AWS Lambda which is a function as a service or FaaS product. Lambda accepts functions which are a small piece of code written in a language. They use a runtime, like Python, Java, node.js, and you are billed for the duration of your execution. So it is an event-driven service and Lambda functions are invoked on an event occurring. You develop code in a language. You pick a runtime using that language, and then you can execute that code based on the triggering of an event. Lambda is considered to be serverless and is a great compute alternative for a serverless architecture. Whether you're working with functions in AWS Lambda, application stacks in Amazon Elastic Beanstalk, container management in Amazon ECS, or keeping it traditional with EC2, there are many compute options within AWS. We have talked about the importance of high availability and scalability and auto scaling and load balancers are used to achieve high availability, fault tolerance, and elasticity. Auto scaling groups are how we configure Amazon EC2 to scale automatically based on different criteria. Load balancing is a method used to distribute incoming connections across a group of servers or services. And incoming connections are made to the load balancer, which then distributes them to the servers or services. In AWS, we have four choices for load balancers: Classic Load Balancer, Application Load Balancer, Network Load Balancer, and the Gateway Load Balancer. And these four make up a family of Elastic Load Balancers and they are great to pair with an auto scaling groups to enhance the high availability, fault tolerance, and scalability of an application. When you create a load balancer, you are creating one entity, one load balancer, but it actually creates an ELB node. So for high availability, a load balancer node should be placed in each Availability Zone that a load balancer uses. For the exam, know the appropriate use of different EC2 instance types, appropriate use of different container options, and the appropriate use of different serverless compute options. Also, understand that auto scaling provides elasticity and how to use both auto scaling and load balancing together. Let's get started with the fourth task statement and we'll talk about AWS database services.