AWS EC2 Summary

Amazon EC2 (Elastic Compute Cloud) is a web service that provides resizable compute capacity in the cloud. You can build and run applications on virtual machines (VMs) using Amazon EC2. Amazon EC2 allows you to pay only for the compute capacity that you use, allowing developers to create and boot new user instances to minutes. Users have full control over the configuration of their instances. You can choose the CPU, memory, storage, and networking capacity that meets your needs.

Key features of EC2:

  • Elasticity and Scalability: EC2 allows users to easily scale computing capacity up or down based on demand.
  • Variety of Instance Types: EC2 offers a wide selection of instance types optimised for different use cases, such as compute-optimised, memory-optimised, and storage-optimised.
  • Pay-As-You-Go Pricing: EC2 follows a pay-as-you-go model.
  • Integration with Other AWS Services: EC2 integrates seamlessly with other AWS services like Amazon S3 (storage), RDS (Relational Database Service), VPC (Virtual Private Cloud), and more.
  • Security: EC2 provides various security features, including security groups and network access control lists (ACLs) to control inbound and outbound traffic to instances.

How it Works

  • Account sign-up: To begin using Amazon EC2, users sign up for a root account on AWS.
  • Choose instance type: Identify the instance type that’s most suitable for their workload.
  • Create VM: Create a VM by selecting “Launch Instance” in the Amazon EC2 dashboard.
  • Connect: Once the instance is launched, connect to it. The easiest way to connect, if it has a public IPv4 address, is with EC2 Instance Connect, a browser-based client. EC2 uses the AWS Management Console, the AWS Command Line Interface (CLI), or AWS Software Developer Kits (SDKs) for managing the scaling according to changing needs and makes it simple to deploy virtual servers and maintain storage. During setup, AMI (Amazon Machine Image) has to be created. AMI includes an operating system, apps, and configurations.

Pricing Options

  • On Demand: It allows you to pay a fixed rate by the hour or even by the second with no commitment. Linux instance is by the second and windows instance is by the hour. On Demand is perfect for users who want low cost and flexibility without any upfront investment.
  • Reserved: This is a way of making a reservation with Amazon for 1 or 3 years. You are making a contract and paying some upfront, so it gives you a significant discount on the hourly charge for an instance.
  • Spot Instances: This allows you to bid for a price you want for instance capacity, and providing better savings if your applications have flexible start and end times. Spot Instances provide less discounts as compared to On-Demand prices.
  • Dedicated Hosts: A dedicated host is a physical server with EC2 instance capacity fully dedicated to your use. The physical EC2 server is the dedicated host that can help you to reduce costs by allowing you to use your existing server-bound software licenses.

Benefits of using Amazon EC2:

  • Multiple instance types with a wide range of computing, memory and networking resources.
  • Secured instances using numerous controls such as security groups and private and public keys.
  • Supports dynamic cloud computing with elastic IP addresses.
  • Users can create Virtual Private Clouds to launch Amazon EC2 resources in a virtual network.
  • Offers a free tier so users can familiarise themselves with some of its features and pay only when they are ready for the full offering.

Challenges with Amazon EC2:

  • Resource utilization: Developers must manage the number of instances to avoid costly large, long-running instances.
  • Security: Developers must ensure that public-facing instances are running securely.
  • Deploying at scale: Running a multitude of instances can result in cluttered environments that are difficult to manage.
  • Management of Amazon Machine Image (AMI) lifecycle: Developers often begin by using default AMIs. As computing needs change, custom configurations will likely be required.
  • Ongoing maintenance: Amazon EC2 instances are VMs that run in Amazon’s cloud. However, they ultimately run on physical hardware, which can fail. AWS alerts developers when an instance must be moved due to hardware maintenance. This requires ongoing monitoring.