AWS Builder Center

EC2 Tenancy Types Explained: Shared, Dedicated Instance, and Dedicated Host

EC2 tenancy determines how your virtual machines are placed on AWS physical hardware. This article explains shared tenancy, Dedicated Instances, and Dedicated Hosts, along with when you would choose each option.

EC2 Tenancy Types Explained

When creating an EC2 instance, you may come across an option called Tenancy.

At first, the options can be confusing because they all involve running EC2 instances, but the main difference is how your instances share or get dedicated access to physical AWS hardware.

There are three tenancy options:
  1. Shared
  1. Dedicated Instance
  1. Dedicated Host




Let's break them down with a practical example.

1. Shared Tenancy

Shared tenancy is the default option for EC2.

With shared tenancy, your EC2 instance runs on AWS physical hardware that can also host instances belonging to other AWS customers.

Think of it like living in an apartment building.

You have your own apartment, but the building itself is shared with other people.
AWS Physical Server
┌─────────────────────────────────┐
│ Customer A: EC2 Instance │
├─────────────────────────────────┤
│ Customer B: EC2 Instance │
├─────────────────────────────────┤
│ Customer C: EC2 Instance │
└─────────────────────────────────┘

You still get an isolated virtual machine. Other customers cannot access your instance simply because they are using the same physical server.

For most workloads, shared tenancy is the normal choice.

When should you use it?

Use shared tenancy when you do not have a specific requirement for dedicated physical hardware.
For example:
  • Web applications
  • APIs
  • Development environments
  • Databases
  • Background workers
  • Most production workloads

If you are just learning AWS and launching your first EC2 instance, this is usually the option you want.



2. Dedicated Instance

With Dedicated Instance, your EC2 instance runs on hardware dedicated to your AWS account.
Other AWS customers cannot have their EC2 instances running on that same physical hardware.
AWS Physical Server
┌─────────────────────────────────┐
│ Your AWS Account │
│ │
│ EC2 Instance │
│ EC2 Instance │
│ EC2 Instance │
└─────────────────────────────────┘

The important thing to understand is that the hardware is dedicated to your account, but you do not get control over the physical server itself.

AWS manages the underlying hardware placement for you.

When might you use it?

Dedicated Instances can make sense when you have a requirement that your EC2 instances must run on hardware dedicated to your AWS account.

However, if you need visibility and control over the physical server, Dedicated Instance is not enough.

That brings us to Dedicated Hosts.



3. Dedicated Host

A Dedicated Host gives you an entire physical server dedicated to your AWS account.

Instead of simply getting dedicated hardware managed behind the scenes, you get visibility into the physical host and can place your EC2 instances on it.
AWS Physical Server
┌─────────────────────────────────┐
│ Dedicated Host │
│ │
│ Your AWS Account │
│ │
│ EC2 Instance │
│ EC2 Instance │
│ EC2 Instance │
│ │
└─────────────────────────────────┘

One important benefit is that Dedicated Hosts give you control over instance placement on the physical server.

They can also be useful for certain licensing requirements where software licenses are tied to physical servers or sockets.

When should you use it?

Dedicated Hosts are generally used when you have a specific business, compliance, or licensing requirement.

For example, an organization may have software with licensing terms based on physical hardware.
For a normal web application, paying for an entire physical host would usually not make sense.



The Difference in One Example

Imagine AWS has a physical server with enough capacity to run several EC2 instances.
With Shared tenancy:
Physical Server
├── Your EC2
├── Customer EC2
├── Customer EC2
└── Customer EC2
With Dedicated Instance:
Physical Server
├── Your EC2
├── Your EC2
└── Your EC2
With Dedicated Host:
Dedicated Physical Server
├── Your EC2
├── Your EC2
└── Your EC2

The biggest difference between the last two is that Dedicated Host gives you control and visibility over the physical host, while Dedicated Instance does not.



Quick Comparison

Feature
Shared
Dedicated Instance
Dedicated Host
Physical hardware shared with other AWS customers
Yes
No
No
Hardware dedicated to your AWS account
No
Yes
Yes
Control over physical host
No
No
Yes
Control over instance placement
No
Limited
Yes
Typical use
Most workloads
Specific isolation requirements
Licensing and physical host requirements



What Should You Choose?

For most applications, Shared tenancy is the right choice.

You should consider Dedicated Instance when you specifically need EC2 instances to run on hardware dedicated to your AWS account.

You should consider Dedicated Host when you need control and visibility over the physical server, or when your software licensing requires dedicated physical hardware.

The key thing I learned is that Dedicated Instance and Dedicated Host are not the same thing.
Dedicated Instance gives you dedicated physical hardware for your AWS account.

Dedicated Host gives you an entire physical server and more control over how your EC2 instances use that server.
For a typical application running on AWS, there is usually no reason to choose dedicated tenancy unless you have a specific requirement that justifies it.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article