Get startedGet started for free

Amazon Elastic Compute Cloud

1. Amazon Elastic Compute Cloud

In this chapter, we'll be diving deeper into Compute services - specifically EC2 instances. We'll show you how to optimize your EC2 instance by choosing the right instance type, how to properly configure your instance, and the various ways to connect to it.

2. What is Amazon Elastic Compute Cloud (EC2)?

Amazon Elastic Compute Cloud, or EC2, provides scalable compute capacity in AWS. Each EC2 machine, called an instance, can scale based on your requirements. AWS offers various instance types optimized for different use cases, and EC2 instances integrate seamlessly with other AWS services like storage, databases, and networks.

3. EC2 instance types

AWS offers six EC2 instance categories: general purpose, compute optimized, memory optimized, storage optimized, accelerated computing, and high-performance computing. Each EC2 category is tailored for a specialized workload. Let's look at when to use each one.

4. General purpose and storage optimized instances

General purpose instances balance compute, memory, and networking resources, ideal for hosting websites and maintaining code repositories. Storage optimized instances handle high read-write throughput on large datasets, perfect for data warehousing and large database refactoring.

5. Compute and memory optimized instances

Compute optimized instances are built for compute-intensive tasks like scientific simulations or financial modeling. Memory optimized instances support memory-heavy applications such as real-time analytics and generating closed captions.

6. Specialized compute instances

Accelerated computing instances feature specialized hardware like GPUs for deep learning and graphics rendering. High-performance computing instances optimize costs for workloads needing consistent, high compute power, like weather forecasting or crash simulations.

7. Creating your EC2 instance

When creating your EC2 instance, you'll configure several key components: The Amazon Machine Image (AMI) is a template that defines the software, such as the operating system, running on your instance. The key pair is a security credential used to connect to your instance. The public key stored on the instance and the private key on your local computer. The Virtual Private Cloud (VPC) is a virtual network dedicated to your AWS account, with one configured by default for each region. Finally, we have the security group & EBS Volume. The security group acts as a firewall, controlling inbound and outbound traffic, while EBS volume refers to the root storage of the machine image.

8. Connecting to your EC2 instance: SSH Client

Connecting to your EC2 instance is crucial for managing your cloud infrastructure. We'll focus on SSH, Session Manager, and EC2 Instance Connect. SSH is the most common method, requiring a private key for direct terminal access. This approach demands key management and proper security group settings.

9. Connecting to your EC2 instance: AWS Session Manager

AWS Session Manager offers secure, keyless access via the Management Console or CLI, eliminating the need for SSH keys or open ports. It’s ideal for security-focused organizations, as it integrates with IAM for fine-grained control and logs session activity.

10. Connecting to your EC2 instance: EC2 Instance Connect

Finally, EC2 Instance Connect provides a browser-based connection without needing an SSH key. It’s perfect for quick, temporary access with minimal setup, directly from the AWS Console.

11. Let's practice!

Now it’s time to explore the AWS console and launch your first web server.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.