Elastic Compute Cloud
Test Your Knowledge
No quiz questions available for this topic yet.
What is Elastic Compute Cloud (EC2)?
Elastic Compute Cloud (EC2) is a web service by amazon-web-services" style="color: #228be6; text-decoration: none;">Amazon Web Services (AWS) that provides secure, resizable compute capacity in the cloud. It's designed to make web-scale cloud computing easier, allowing users to obtain and configure capacity with minimal friction.
How does EC2 pricing work?
EC2 pricing is based on several models including On-Demand, Reserved Instances, and Spot Instances. On-Demand means you pay per hour or second; Reserved offers discounts for commitments, and Spot Instances allow bidding on spare capacity.
What are EC2 instance types?
EC2 instance types comprise various configurations of CPU, memory, storage, and networking capacity allowing users to select an appropriate combination of resources specific to their application needs, such as compute optimized, memory optimized, and GPU instances.
What is an Amazon Machine Image (AMI)?
An Amazon Machine Image (AMI) is a template that contains a software configuration (OS, application server, and applications) which can be used to launch a virtual machine (EC2 instance) in the cloud.
How can I secure my EC2 instances?
Security for EC2 instances can be enhanced by utilizing Security Groups, key pairs for SSH access, setting up Virtual Private Clouds, and using IAM roles for controlled access to AWS services.
What is EC2 Auto Scaling?
EC2 Auto Scaling is a feature that automatically adjusts the number of EC2 instances in response to changing application demand, helping to maintain performance and automatically increasing or decreasing capacity as necessary.
What is an EC2 Spot Instance?
An EC2 Spot Instance allows users to purchase unused EC2 capacity at discounted rates. Spot Instances are cost-effective options for fault-tolerant and flexible applications due to the possibility of interruptions.
How do EC2 Reserved Instances work?
EC2 Reserved Instances provide a significant discount on EC2 usage by allowing you to purchase 1- or 3-year term contracts. They allow greater flexibility in terms of instance sizes and families within a region.
Why should you use EC2 Spot Instances?
Spot Instances are ideal for workloads that are flexible, cost-sensitive, and can tolerate interruptions, such as batch processing, data analysis, or testing and development, offering savings up to 90% compared to On-Demand pricing.
What is an EC2 Elastic IP address?
An Elastic IP address is a static IPv4 address designed for dynamic cloud computing, allowing users to mask the failure of an instance or software by remapping the public IP to another instance in the account.
How can I connect to an EC2 instance?
You can connect to an EC2 instance using SSH for Linux or RDP for Windows instances. Access requires a key pair (private key) and the instance's public DNS or IP address.
What is an EC2 Security Group?
An EC2 Security Group acts as a virtual firewall for your instance to control inbound and outbound traffic, with rules specified for allowing or restricting traffic types and sources.
What are EC2 instance states?
EC2 instance states include: pending, running, stopping, stopped, shutting-down, and terminated. These indicate the lifecycle stages of the instance, from creation to ending the virtual machine’s execution.
How do you stop and start an EC2 instance?
You can stop an EC2 instance through the AWS Management Console, AWS CLI, or AWS SDK. Stopping an instance saves costs, while starting it makes the instance available for connection again.
What is EC2 instance metadata?
EC2 instance metadata provides information about a running instance, such as its instance ID, AMI ID, instance type, and AWS region, accessible via HTTP requests near the instance.
What are the benefits of EC2 Auto Scaling?
Benefits include maintaining application availability, automatically adjusting capacity to sustain steady, predictable performance at the lowest possible cost, and terminating unnecessary instances to optimize resource utilization.
What is an EC2 Placement Group?
EC2 Placement Groups are used to influence how instances are placed on underlying hardware across Availability Zones. They enhance performance by using cluster, spread, or partition methods.
How does EC2 Elastic Load Balancing work?
Elastic Load Balancing automatically distributes incoming application traffic across multiple targets, such as EC2 instances, in multiple Availability Zones, improving application fault tolerance and performance.
What is EC2 instance resizing?
Instance resizing, known as changing the instance type, involves adjusting the combination of compute, memory, and storage capacities of your instance to accommodate your application's performance and budgetary requirements.
What is an EC2 Instance Lifecycle?
The EC2 Instance Lifecycle includes stages such as pending, running, stopping, stopped, shutting-down, and terminated, managing the instance's lifecycle from setup to final shutdown.
What are Elastic Network Interfaces (ENIs) in EC2?
Elastic Network Interfaces are virtual network interfaces attached to EC2 instances, enabling network connectivity. They provide a MAC address, multiple private IP addresses, and one or more security groups.
How can I monitor EC2 instances?
Monitoring EC2 instances can be performed using Amazon CloudWatch, which provides actionable visibility into resource utilization, application performance, and operational health using metrics, logs, and alarms.
What is the EC2 instance purchasing option?
EC2 instance purchasing options include On-Demand Instances, Reserved Instances, Spot Instances, and dedicated hosts, each offering varying flexibility, cost, and availability configurations.
How are EC2 instances billed?
EC2 instances are billed based on the type, hourly or per-second usage, storage, network transference, data transfer costs, and any additional AWS services utilized by the instances.
How can you increase EC2 instance storage?
EC2 instance storage can be increased by attaching additional Elastic Block Store (EBS) volumes, resizing existing EBS volumes, or adding ephemeral storage from instance types that support it.
What are EC2 Reserved Instances?
Reserved Instances provide a discount in exchange for a 1- or 3-year term commitment, varying by instance attributes like region, instance type, tenancy, and availability zone.
How is EC2 reliability achieved?
EC2 reliability is achieved through running instances across multiple regions and availability zones, along with leveraging services like Elastic Load Balancing and Auto Scaling to distribute and manage workloads efficiently.
What is EC2 Spot Fleet?
EC2 Spot Fleet is a collection of Spot Instances and, optionally, On-Demand Instances governed by a specified target capacity, enabling large-scale processing of data and complex workloads at reduced costs.
What is the difference between EC2 instances and Lambda?
EC2 instances provide flexible, raw compute resources with full OS control, while lambda" style="color: #228be6; text-decoration: none;">AWS Lambda offers serverless compute for running code without the need for managing servers, with automatic scaling.
How do EC2 instance types affect performance?
Instance types affect performance by providing varying ratios of CPU, memory, storage, and networking capacity, enabling workload-specific optimization from general-purpose to highly compute-intensive tasks.
What is EC2 instance tenancy?
EC2 instance tenancy options include shared tenancy, dedicated instances, and dedicated hosts. Each provides different levels of hardware sharing, isolation, and cost for specific compliance or performance needs.
How do EC2 Regions and Availability Zones differ?
Regions are separate geographic areas for deploying infrastructure. Availability Zones are isolated locations within a region, providing redundancy and reliability, enabling users to avoid potential failures.
What is an EC2 Classic instance?
EC2 Classic refers to the original environment where all instances run in a flat network, shared with other users. AWS is phasing out EC2 Classic in favor of VPCs offering more isolation.
Can EC2 support Windows OS?
Yes, EC2 supports Windows OS alongside several Linux distributions. It offers pre-configured Windows AMIs and provides integration with Microsoft services for easier deployment.
What is EC2 Enhanced Networking?
Enhanced Networking provides higher bandwidth, lower latency, and less jitter to EC2 instances, using advanced virtualization features with SR-IOV technology and support for up to 100 Gbps networking speeds.
How do EC2 instance backups work?
EC2 backups can be created by taking snapshots of attached EBS volumes. Snapshots are stored in Amazon S3 and facilitate point-in-time recovery of data.
What is EC2 Elastic GPU?
Elastic GPUs provide flexible graphics acceleration for running applications requiring graphics processing capability by attaching a GPU to an existing EC2 instance.
Can EC2 run containerized applications?
Yes, EC2 can run containerized applications using services like Amazon ECS or Amazon EKS, facilitating easy deployment, management, and scaling of containerized workloads.
What is an EC2 Dedicated Host?
An EC2 Dedicated Host is a physical server allocated to your AWS account, offering full control of instance placement, assisting in licensing needs, and reducing costs via dedicated capacity.
What is EC2 Hibernate?
EC2 Hibernate allows you to pause an instance's operation, preserving the RAM on disk and restarting from the saved state, useful for pre-warmed applications that take long setup times.
What are EC2 Savings Plans?
EC2 Savings Plans provide cost savings for EC2 usage regardless of instance family, region, or OS, with usage commitments over 1- or 3-year terms, providing flexibility and predictable discount structures.
What is EC2 User Data?
EC2 User Data is provisioning information supplied to an instance at launch, enabling automated configuration tasks or scripts execution, such as setting environment variables or installing software packages.
What are EC2 Instance Tags?
EC2 Instance Tags are key-value pairs used to organize, identify, and manage your instances, allowing cost allocation, resource grouping, and automation through tag-based policies and permissions.
What is EC2 Fleet?
EC2 Fleet allows users to provision capacity across different EC2 instance types, On-Demand, Spot, and Reserved Instances in a single API call, optimizing cost and resource for complex workloads.
How do EC2 hosts differ from EC2 instances?
EC2 Dedicated Hosts provide visibility into the physical server instance placement and capacity, unlike EC2 instances, which are abstracted units of compute capacity within shared environments.
What is EC2 Rebalancing?
EC2 Rebalancing automatically migrates or replaces affected instances, ensuring load distribution evenly across servers, optimizing resource utilization, and maintaining application performance during hardware failures or maintenance.
How does EC2 Inference work?
EC2 Inf1 instances are optimized for deep learning inference applications, providing high performance at low cost with the use of custom AWS Inferentia chips, supporting frameworks such as TensorFlow.
What is EC2 Traffic Mirroring?
EC2 Traffic Mirroring allows the capture of network traffic from EC2 instances, enabling security monitoring, intrusion detection, and troubleshooting by replicating traffic to out-of-band collection and analysis tools.
How to troubleshoot EC2 instance unreachable issues?
To troubleshoot, check security group rules, verify network ACLs, inspect instance status checks, ensure correct instance configuration, review route tables, and assess network connectivity from external sources.