Week 6 - Computing in Cloud Flashcards
What are the AWS Compute Services covered in this subject?
- Amazon EC2
- Amazon Elastic Beanstalk
- AWS Lambda
- AWS Fargate
- Amazon Elastic Kubernetes Service (EKS)
- Amazon Elastic Container Registry
- Amazon Elastic Container Service (Amazon ECS)
What is Amazon EC2?
Amazon EC2 (Elastic Compute Cloud) provides virtual machines (EC2 instances) in the cloud, offering Infrastructure as a Service (IaaS). It gives you full control over the guest operating system (OS) on each instance.
Key features:
- Elastic: On-demand provisioning of resources, scaling as needed.
- Compute: Provides CPU and RAM for running applications.
- Cloud: Hosted in the AWS cloud, enabling flexible and scalable computing resources.
- Launch instances into specific Availability Zones and control traffic in and out.
What are the nine key decisions when launching an EC2 instance?
- Amazon Machine Image (AMI): Choose an image that defines the OS and software for your instance.
- Instance type: Select the type based on the required CPU, RAM, and storage for your application.
- Network settings: Configure VPC, subnet, and IP addressing for your instance.
- Identity and Access Management (IAM) role: Assign a role to define permissions for the instance.
- User data: Provide initialization scripts to run when the instance launches.
- Storage options: Configure the storage for your instance, such as EBS volumes.
- Tags: Assign tags to identify and organize your instances.
- Security group: Set inbound and outbound traffic rules for your instance.
- Key pair: Select or create an SSH key pair for secure access to your instance.
What are the network settings when launching an EC2 instance?
Specify the Region: Choose the AWS region where the instance will be launched.
Launch into a default VPC: The instance is automatically launched in the default Virtual Private Cloud (VPC) with AWS assigning a public IP address.
Launch into a non-default VPC: You can choose a custom VPC for your instance, where you can decide whether to assign a public IP address.
What are tags when launching EC2 instances, and what are their benefits?
Tags are a naming and labeling system for AWS resources, consisting of a Key and a Value.
Benefits of using tags:
Filtering: Easily organize and manage resources based on tags.
Automation: Automate processes like backups or scaling based on tags.
Cost allocation: Track costs by grouping resources using tags for detailed billing.
Access control: Set permissions to control access to resources based on tags.
What is a key pair when launching EC2 instances, and how is it used?
A key pair consists of a public key (stored at AWS) and a private key (stored locally by the customer).
For Windows AMIs: The private key is used to obtain the administrator password needed to log in to the instance.
For Linux AMIs: The private key is used for SSH access to securely connect to the instance.
What service should you use for monitoring your EC2 instance?
Amazon CloudWatch of course!
What are key notes for EC2 cost optimization?
EC2 offers several pricing models, including On-Demand Instances, Reserved Instances, Spot Instances, Dedicated Instances, and Dedicated Hosts.
Spot Instances can offer significant savings but can be interrupted with a 2-minute notification.
Per second billing is available for On-Demand, Reserved, and Spot Instances using Amazon Linux or Ubuntu.
The four pillars of cost optimization are:
1. Right size – Choose the appropriate instance size.
2. Increase elasticity – Scale resources dynamically.
3. Optimal pricing model – Select the most cost-effective pricing model.
4. Optimize storage choices – Use the right storage options for your needs.
What are containers?
Containers are a form of operating system virtualization, not a virtual machine.
- Containers virtualize the OS, allowing applications to run independently on any platform.
- On the other hand, Virtual machines virtualize hardware, enabling efficient use of physical resources.
Containers are lightweight and portable, providing a consistent environment for applications across different systems.
What is Docker?
Docker is a platform that allows you to package and run applications in isolated environments called containers.
- Docker engine is the core component that creates and runs containers. It is installed on the guest OS (Linux) of an EC2 instance.
- A single application can span multiple containers, providing flexibility and scalability.
- Docker enables applications to run consistently across different environments by virtualizing the operating system, ensuring portability.
What is Amazon Elastic Container Service (Amazon ECS)?
Amazon ECS is a fully managed container orchestration service that helps you run and scale Docker containers.
Key Benefits:
- Orchestrates Docker containers: Manages the deployment, scaling, and operations of containers.
- Scales automatically: Handles the scaling of the underlying infrastructure that runs the containers.
- Simplifies infrastructure management: Reduces the complexity of setting up and managing the necessary infrastructure for containers.
What is Serverless Computing?
Serverless computing allows you to run code without provisioning or managing servers. With serverless services like AWS Lambda, you upload your code, set triggers (such as events or schedules), and AWS automatically manages the infrastructure. You only pay for the compute time your code consumes, making it highly scalable and cost-efficient. It abstracts away server management, allowing you to focus on application logic.
What are the AWS Lambda Quotas?
Soft Limits per Region:
Concurrent executions: 1,000
Function and layer storage: 75 GB
Hard Limits for Individual Functions:
Maximum function memory allocation: 10,240 MB
Function timeout: 15 minutes
Deployment package size: 250 MB unzipped (including layers)
Container image code package size: 10 GB
What is AWS Elastic Beanstalk?
AWS Elastic Beanstalk is a Platform as a Service (PaaS) for web applications and services. It allows customers to simply upload their code while AWS handles the underlying infrastructure. Elastic Beanstalk automatically manages tasks such as infrastructure provisioning, deployment, load balancing, automatic scaling, health monitoring, analysis, debugging, and logging.
What does the customer handle when using AWS Beanstalk?
When using AWS Elastic Beanstalk, customers are responsible for choosing their instance type and database, setting and adjusting automatic scaling, updating their application, accessing server log files, and enabling HTTPS on the load balancer.