What Is Amazon EC2? AWS Virtual Servers, Instance Types and Pricing

Sunucun 3 min read

Amazon EC2 (Elastic Compute Cloud) is Amazon Web Services’ (AWS) service for renting virtual servers in the cloud. With EC2 you launch as many virtual servers (called instances in AWS) as you need, choose the processor and memory capacity, configure network and security settings and pay only for the time you use. You can increase capacity when the load grows and reduce it when the load falls.

Illustration: AWS

Key EC2 Concepts

ConceptWhat it does
InstanceA virtual server in the AWS cloud.
AMI (Amazon Machine Image)A ready-made server template containing the operating system and software (Amazon Linux, Ubuntu, Windows Server, etc.).
Instance typeDifferent combinations of processor, memory, storage, network and GPU hardware (families for general purpose, compute, memory, storage or accelerated computing).
EBS volumeA persistent disk whose data is kept even when the instance is stopped (Elastic Block Store).
Instance storeA temporary disk; its data is deleted when the instance is stopped, hibernated or terminated.
Key pairSecure login credentials for the server; AWS stores the public key and you keep the private key.
Security groupA virtual firewall that defines which protocols, ports and IP ranges are allowed access.
Elastic IPA static public IP address that can be assigned to an instance.
Region / Availability ZoneThe geographic region where the server runs, and the separate groups of data centres within that region.

EC2 Pricing Models

  • On-Demand: Pay per second (minimum 60 seconds) with no commitment or upfront payment.
  • Savings Plans: A discount in return for committing to a certain hourly spend (in USD) for 1 or 3 years.
  • Reserved Instances: A discount for a 1- or 3-year commitment to a specific instance type and region.
  • Spot Instances: Use AWS’s spare capacity at a much lower price; because AWS can take the capacity back, they are for interruption-tolerant workloads.
  • Dedicated Hosts: A physical server reserved for you; for using software licences tied to a server.
  • Free tier: According to the AWS page, new customers can get up to 200 USD in credits that can be used for up to 6 months, and EC2 is included. Terms can change, so check aws.amazon.com/free.

Your bill includes not only server time but also items such as EBS disks, snapshots, Elastic IPs and data transferred out to the internet. Calculate the cost in advance with the AWS Pricing Calculator and set up a billing alert.

How to Launch a Server on EC2

  1. Create an AWS account and open the EC2 console; choose the region in the top right.
  2. With Launch instance, give the server a name and choose an AMI (for example Ubuntu Server or Windows Server).
  3. Choose the instance type; a small general-purpose type is enough for a small website.
  4. Create a key pair and store the private key file somewhere safe.
  5. In the security group, open only the ports you need (for example SSH 22 only to your own IP, and 80/443 for the web).
  6. Set the disk (EBS) size and launch the instance; connect with SSH on Linux or RDP on Windows.

EC2 or VPS?

Amazon EC2Classic VPS / cloud server
BillingUsage-based; traffic, disk and IP are separate itemsUsually a fixed monthly plan
ScalingAuto scaling, load balancing, multiple regionsBy upgrading the plan
ManagementLarge AWS ecosystem, steeper learning curveSimpler panel and local support
Best suited forVariable load, applications integrated with AWS servicesWebsites, e-commerce, application servers, a predictable budget

For projects that serve visitors in Türkiye and want to keep costs fixed, our VPS server or cloud server plans are a more predictable option. For cloud concepts, see our articles what is cloud computing and virtualisation.

Frequently Asked Questions

Is EC2 free?

New AWS accounts can try EC2 free for a while with free tier credits. When the credits or the period run out, usage is charged; when the trial ends, remember to delete instances, disks and Elastic IPs you are not using.

Am I still charged if an EC2 instance is stopped?

You are not charged for compute on a stopped instance, but attached EBS disks and, in some cases, Elastic IPs continue to be charged. To stop all charges, you need to terminate and delete the resources.

Categories

Latest guides