0% found this document useful (0 votes)
66 views33 pages

Aws Academy 6-10 Modules Notes

Module 6 covers compute services in AWS, including Amazon EC2, cost optimization strategies, container services, AWS Lambda, and AWS Elastic Beanstalk. It details various EC2 pricing models such as On-Demand, Reserved Instances, Savings Plans, Spot Instances, Dedicated Hosts, and Dedicated Instances, along with their use cases. Additionally, it explains container concepts, orchestration tools like Docker, ECS, Kubernetes, and Fargate, and introduces Amazon ECR for managing container images.

Uploaded by

xavier.kk.551
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views33 pages

Aws Academy 6-10 Modules Notes

Module 6 covers compute services in AWS, including Amazon EC2, cost optimization strategies, container services, AWS Lambda, and AWS Elastic Beanstalk. It details various EC2 pricing models such as On-Demand, Reserved Instances, Savings Plans, Spot Instances, Dedicated Hosts, and Dedicated Instances, along with their use cases. Additionally, it explains container concepts, orchestration tools like Docker, ECS, Kubernetes, and Fargate, and introduces Amazon ECR for managing container images.

Uploaded by

xavier.kk.551
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Module 6

COMPUTE
Topics

. Compute services overview

. Amazon EC2

. Amazon EC2 cost optimization

. Container services

. Introduction to AWS Lambda

. Introduction to AWS Elastic Beanstalk

1.Compute Services
2.AMAZON EC2
Nine Steps to consider while creating EC2 Instance
Part 3
3.EC2 Cost Optimization

1. On-Demand Instances

 Description: Pay for compute capacity by the hour or second (minimum of 1 minute) with no
long-term commitments.

 Use Case: Ideal for short-term workloads, unpredictable traffic, or applications being developed
or tested.

 Example: Running a web application during a promotion.

2. Reserved Instances (RI)

 Description: Commit to using EC2 instances for 1 or 3 years in exchange for significant discounts
(up to 75%) compared to On-Demand prices.

 Types:

o Standard Reserved Instances: Deep discounts for steady-state workloads.

o Convertible Reserved Instances: Flexible; allows exchanging for different instance types
or sizes.

o Scheduled Reserved Instances: For workloads that run on a regular schedule.

 Use Case: Best for steady-state or predictable usage (e.g., always-on databases).
3. Savings Plans

 Description: A flexible pricing model offering lower rates on EC2 and Fargate usage in exchange
for a commitment to a consistent amount of usage (measured in $/hour) for 1 or 3 years.

 Use Case: Good for consistent workloads across different instance families, regions, or AWS
services.

4. Spot Instances

 Description: Utilize unused EC2 capacity at discounts of up to 90% off On-Demand prices. Prices
fluctuate based on supply and demand.

 Use Case: Suitable for fault-tolerant and flexible workloads like batch jobs, big data analysis, or
CI/CD pipelines.

 Risk: Instances can be terminated if AWS needs the capacity back.

5. Dedicated Hosts

 Description: Physical servers fully dedicated to your use. You pay for the entire host.

 Use Case: Ideal for regulatory compliance or licensing that requires physical hardware
separation.

 Example: Running legacy software that requires specific hardware.

6. Dedicated Instances

 Description: Instances that run on hardware dedicated to a single customer but priced based on
instance usage, not the host.

 Use Case: Provides physical isolation for compliance needs.


4.Container Services

What is a Container?

A container is a lightweight, portable, and self-contained unit that includes an application and all its
dependencies (libraries, binaries, and configuration files) packaged together. Containers run consistently
across different environments, whether it’s a developer’s local machine, a test environment, or a
production server.

 Key Features:

o Isolation: Containers isolate the application and its dependencies from the host system
and other containers.

o Lightweight: Containers share the host OS kernel, making them faster to start and less
resource-intensive than virtual machines (VMs).

o Portability: They work the same way across different systems (e.g., development,
testing, production).

 Examples: Docker containers, Kubernetes Pods.


This diagram compares containers and virtual machines (VMs) on AWS, demonstrating their
architectural differences when deployed on EC2 instances.

Left Side: Containers

 Three Containers on One EC2 Instance:

o All containers share the same EC2 instance guest OS (operating system).
o Each container is isolated and contains its own application (e.g., App 1, App 2, App 3)
along with its required binaries and libraries (Bins/Libs).

o The Docker engine (or another container runtime) runs on the EC2 instance and
manages container creation, execution, and resource allocation.

o Advantages:

 Containers are lightweight because they share the OS kernel.

 Efficient resource utilization since multiple containers can run on a single EC2
instance without requiring a separate OS for each application.

Right Side: Virtual Machines (VMs)

 Three Virtual Machines on Three EC2 Instances:

o Each VM has its own copy of the guest OS, along with its binaries, libraries, and the
application.

o The hypervisor manages the virtualization layer, enabling multiple VMs to run on the
same physical server.

o Each VM is isolated from the others.

o Disadvantages:

 VMs are heavier than containers because each VM includes a full operating
system.

 Resource utilization is less efficient compared to containers, as each VM requires


dedicated OS overhead.
Think of a Restaurant Analogy

Imagine you’re running a restaurant. Here's how Docker, ECS, Kubernetes, and Fargate fit into the
picture:

1. Docker:

o It’s like the kitchen staff who prepare and package the food.
o It’s responsible for creating and running containers (small, lightweight packages that
include everything needed to run your application, like the ingredients and recipe for a
dish).

2. Amazon ECS (Elastic Container Service):

o ECS is like a restaurant manager who tells the kitchen staff (Docker) which dishes to
prepare, when, and how many.

o It’s a container orchestration tool that manages the deployment and scaling of
containers. It works specifically with AWS infrastructure.

3. Kubernetes:

o Kubernetes is like a franchise manager running multiple restaurants, ensuring all


branches are consistent, well-staffed, and handling customers efficiently.

o It’s a container orchestration tool like ECS but works across multiple environments
(AWS, Google Cloud, on-premises). It’s more complex but more powerful for large,
distributed systems.

4. AWS Fargate:

o Fargate is like a delivery service that takes care of the kitchen (containers) and delivery
(infrastructure) without you worrying about hiring delivery drivers (servers).

o It’s serverless—you don’t manage the underlying infrastructure for running your
containers.

Breaking Down Each Concept

1. Docker:

 What it does: Creates and runs containers.

 Key feature: It’s lightweight and portable. You can run a container on your laptop, in AWS, or
anywhere.

 Example: You create a container with your app and all its dependencies. Think of it as a "ready-
to-eat meal in a box."

2. Amazon ECS:

 What it does: Manages the deployment of your Docker containers on AWS infrastructure.

 Key feature: It’s AWS-native and works well with other AWS services like IAM, CloudWatch, and
ELB.
 Example: ECS decides how many containers to run (scaling) and which EC2 instances (servers) to
run them on. Think of it as a manager assigning jobs to staff in your restaurant.

3. Kubernetes:

 What it does: Like ECS, it manages and orchestrates containers, but it’s more flexible and not
tied to AWS.

 Key feature: Works across multiple cloud providers and even on-premises systems.

 Example: If your business operates across multiple locations (AWS, Google Cloud, or even on
your own servers), Kubernetes ensures consistency across all locations. It handles scaling, load
balancing, and failover.

4. AWS Fargate:

 What it does: Runs your Docker containers without you managing the servers.

 Key feature: Serverless—AWS takes care of the infrastructure, so you only focus on the
containers.

 Example: Instead of buying and managing delivery trucks (servers), you just tell AWS how many
containers to run, and Fargate handles the rest.

When to Use What

1. Docker:

o Use when you want to create portable containers during development.


o Example: You’re building an app on your laptop and want it to run the same way in
production.

2. Amazon ECS:

o Use when you’re all-in on AWS and want an easy way to manage and scale your
containers.

o Example: Running a microservices app on AWS with EC2 instances.

3. Kubernetes:

o Use when you need advanced orchestration across multiple clouds or hybrid
environments.

o Example: Managing a global app that needs to run on AWS, Google Cloud, and on-
premises servers.

4. AWS Fargate:

o Use when you don’t want to manage servers at all and prefer a serverless container
solution.

o Example: Running short-lived tasks like batch processing or event-driven apps.

Quick Analogy Recap

 Docker: The kitchen staff (prepares containers).

 ECS: The restaurant manager (deploys containers on AWS).

 Kubernetes: The franchise manager (handles multi-location setups).

 Fargate: The delivery service (runs containers without worrying about servers).

Amazon ECR (Elastic Container Registry)

Amazon Elastic Container Registry (ECR) is a fully managed container image registry provided by AWS. It
simplifies the process of storing, managing, and deploying Docker container images. Think of it as a
private storage service specifically designed for your container images.

What Does ECR Do?

When you work with containers, you need a place to store the container images (the "blueprints" of your
containers). ECR acts as this storage, ensuring your images are:

1. Securely Stored: All images are encrypted at rest and during transit.

2. Easily Accessible: Fully integrated with AWS services like ECS, EKS, and Fargate.
3. Highly Available: Images are stored in a highly available and scalable environment.

5.AWS Lambda
6.AWS Elastic Beanstalk

You might also like