you are locking down a single piece of hardware just for your purposes.

Dedicated Instance does not work like this. Your instance runs on some dedicated hardware. Its not lockdown to you. If you stop/start instance, you can get some other hardware somewhere else. Basically, the hardware is "yours" (you are not sharing it with others) for the time your instance is running. You stop/start it, you may get different physical machine later on (maybe older, maybe newer, maybe its specs will be a bit different), and so on. So your instance is moved around on different physical servers - whichever is not occupied by others at the time.

With Dedicated Host the physical server is basically yours. It does not change, it's always the same physical machine for as long as you are paying.

Answer from Marcin on Stack Overflow
🌐
AWS
aws.amazon.com › amazon ec2 › pricing › dedicated instances
Amazon EC2 Dedicated Instances
6 days ago - Dedicated Instances are Amazon EC2 instances that run in a VPC on hardware that's dedicated to a single customer. Your Dedicated instances are physically isolated at the host hardware level from instances that belong to other AWS accounts. Dedicated instances may share hardware with other instances ...
🌐
Amazon Web Services
docs.aws.amazon.com › amazon ec2 › user guide › amazon ec2 instances › amazon ec2 billing and purchasing options › amazon ec2 dedicated hosts › cross-account amazon ec2 dedicated host sharing
Cross-account Amazon EC2 Dedicated Host sharing - Amazon Elastic Compute Cloud
In this model, the AWS account that owns the Dedicated Host (owner) shares it with other AWS accounts (consumers). Consumers can launch instances onto Dedicated Hosts that are shared with them in the same way that they would launch instances onto Dedicated Hosts that they allocate in their ...
🌐
Amazon Web Services
docs.aws.amazon.com › amazon ec2 › user guide › amazon ec2 instances › amazon ec2 billing and purchasing options › amazon ec2 dedicated hosts › cross-account amazon ec2 dedicated host sharing › share an amazon ec2 dedicated host across aws accounts
Share an Amazon EC2 Dedicated Host across AWS accounts - Amazon Elastic Compute Cloud
If consumers launch instances with ... that they own in their account, the instance is automatically launched onto the shared Dedicated Host. To share a Dedicated Host, you must add it to a resource share. A resource share is an AWS RAM resource that lets you share your resources ...
Top answer
1 of 6
235

you are locking down a single piece of hardware just for your purposes.

Dedicated Instance does not work like this. Your instance runs on some dedicated hardware. Its not lockdown to you. If you stop/start instance, you can get some other hardware somewhere else. Basically, the hardware is "yours" (you are not sharing it with others) for the time your instance is running. You stop/start it, you may get different physical machine later on (maybe older, maybe newer, maybe its specs will be a bit different), and so on. So your instance is moved around on different physical servers - whichever is not occupied by others at the time.

With Dedicated Host the physical server is basically yours. It does not change, it's always the same physical machine for as long as you are paying.

2 of 6
28

Dedicated Host

As soon as you 'allocate' a Dedicated Host, you start paying for that whole host.

A host computer is very big. In fact, it is the size of the largest instance of the selected family, but can be divided-up into smaller instances of the same family. ("You can run any number of instances up to the core capacity associated with the host.")

Any instances that run on that Host are not charged, since you are already being billed for the Host.

That is why a Dedicated Host is more expensive than a Dedicated Instance -- the charge is for the whole host.

Dedicated Instance

"Dedicated Instances are Amazon EC2 instances that run in a virtual private cloud (VPC) on hardware that's dedicated to a single customer... Dedicated Instances may share hardware with other instances from the same AWS account that are not Dedicated Instances."

This means that no other AWS Account will run an instance on the same Host, but other instances (both dedicated and non-dedicated) from the same AWS Account might run on the same Host.

Billing is per-instance, with a cost approximately 10% more than the normal instance charge (but no extra charge if it is the largest instance in the family, since it requires the whole host anyway).

Find elsewhere
🌐
Amazon Web Services
docs.aws.amazon.com › amazon ec2 › user guide › amazon ec2 instances › amazon ec2 billing and purchasing options › amazon ec2 dedicated hosts › cross-account amazon ec2 dedicated host sharing › view shared amazon ec2 dedicated hosts in your aws account
View shared Amazon EC2 Dedicated Hosts in your AWS account - Amazon Elastic Compute Cloud
The command returns the Dedicated Hosts that you own and Dedicated Hosts that are shared with you. The value of Owner is the account ID of the owner of the Dedicated Host. The Instances list describes the instances running on the host. aws ec2 describe-hosts --filter "Name=state,Values=available"
🌐
AWS
docs.aws.amazon.com › aws whitepapers › aws whitepaper › logical separation compared to physical separation › host and instance features
Host and Instance Features - Logical Separation on AWS
AWS is constantly evolving its security capabilities at both the host and instance level of operations. These features provide isolation and separation of operations for host hardware and the instances running on those hosts. With the introduction of
🌐
Trend Micro
trendmicro.com › cloudoneconformity › knowledge-base › aws › EC2 › ec2-instance-tenancy.html
EC2 Instance Tenancy | Trend Micro
November 25, 2024 - Shared: Run a shared hardware instance – to deploy the instance in a logically isolated hardware environment (Shared Instance). This is the default tenancy type used by most EC2 instances deployed in the AWS cloud.
🌐
AWS
docs.aws.amazon.com › auto scaling › user guide › auto scaling launch templates › create a launch template using advanced settings
Configure instance tenancy with a launch configuration
Shared (Shared) – Multiple AWS accounts may share the same physical hardware. This is the default tenancy option when launching an instance.
🌐
The IT Hollow
theithollow.com › 2017 › 10 › 16 › understanding-aws-tenancy
Understanding AWS Tenancy - The IT Hollow
January 27, 2019 - Shared tenancy means that multiple EC2 instances from different customers may reside on the same piece of physical hardware. The dedicated model means that your EC2 instances will only run on hardware with other instances that you’ve deployed, ...
🌐
Medium
medium.com › @nikhil.nagarajappa › finding-instance-flavour-shared-or-dedicated-hosts-of-ec2-instances-in-an-aws-eks-8df8cdc4fbf5
Finding Instance Flavour(shared or Dedicated hosts) of EC2 instances in an AWS EKS | by Nikhil YN | Medium
April 13, 2023 - aws ec2 describe-instances — filters “Name=tag:aws:eks:cluster-name,Values=<cluster-name>” — query “Reservations[].Instances[].{InstanceId:InstanceId,InstanceType:InstanceType,Hypervisor:Hypervisor,Placement:Placement,HostId:Placement.HostId,IsDedicatedInstance:contains(Placement.GroupName,’Dedicated’)}” one can find out whether the ec2 instances of EKS have dedicated or shared host.
Top answer
1 of 4
4

It is not possible to share a single EBS volume between multiple EC2 instances.

Your diagram is offloading the data to a shared server. However, this shared server is simply another single-point-of-failure. So you're not saving yourself anything: if the AZ of that server goes down, then you've lost the data, even if the web server/VisualSVN server in another AZ is still running.

You should split your server between it's two separate functions into two separate servers/clusters so they can be handled independently of each other:

  1. web server, and
  2. VisualSVN server

For the web server, do you really need to mirror the volume in a multi-instance scenario, or can you keep your instances anytime-terminatable without data loss? Ideally, you would not save any data locally to the instance. Instead, you would save all data off-server to a database or to Amazon S3. This way, the data is available to all instances, all the time. If the server is lost, none of the data is. Make your "master" AMI and create all instances in an auto-scaling group from that master AMI. When your web server code changes, deploy a new AMI, terminate the old instances and create new ones from the new AMI.

For the VisualSVN server, the question to ask is whether VisualSVN can handle volume data changing on it without the running process caring about it. For example, if the running process caches some data in RAM, what happens if some hard drive sync process comes along behind it's back and changes the hard drive on it? It could be that the VisualSVN server simply is not able to handle a multi-instance scenario. Depending on the answer to that, you may not be able to cluster the VisualSVN server. It's possible that VisualSVN server has it's own clustering feature. If so, then you should investigate that.

2 of 4
12

This is a use case that has been sought after for quite a while in AWS. As is described in this thread, two common ways to accomplish this was to use S3 or NFS to share data access between instances.

On April 9th 2015, Amazon announced Amazon Elastic File System (Amazon EFS), which provides what you are asking for in your diagram.

Top answer
1 of 2
1
If you have Reserved Instances and Saving Plans sharing on for all accounts, you have no control which account the RI will apply to first if the eligible EC2 instances launched on both accounts. It is recommended to purchase RIs in linked account incase that control needed. In your case, if you only have 3 accounts and there is no need for Account #2 to use the RIs, you can disable RI and SP sharing with account #2. This leaves the RI available to Account #1 and Account #3. You can do that by going to this link in your account: https://us-east-1.console.aws.amazon.com/billing/home?region=us-east-1#/preferences If you want to verify that Account #3 is covered by reserved instances on specific EC2 usages, In Account #3 navigate to: * Billing and Cost Management * In the navigation pane to the left, go to **Reservations**, and choose **Coverage Report**. * Here look at the Instance type which matches the RI and check if the coverage apply and at what percentage. You can view the same report from Account #1 by using the Linked Account filter in the right of your screen.
2 of 2
0
As long as the accounts are part of the same AWS Organisation and Reserved Instance and Savings Plans discount sharing has not been deactivated (the default is that is is active) then the discount for using reserved instances will be applied across all accounts that are part of the organisation. Your situation is similar to this example here https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/consolidatedbilling-other.html#consolidatedbilling-ec2 If your bill is higher than expected then you can always raise a billing support case https://support.console.aws.amazon.com/support/home#/case/create
🌐
DEV Community
dev.to › shameel › awstuff-dedicated-instance-vs-dedicated-host-327e
AWStuff: Dedicated Instance vs. Dedicated Host - DEV Community
July 14, 2024 - By default, EC2 instances run on shared tenancy hardware. This means that multiple AWS accounts might share the same physical hardware. Dedicated Instances are EC2 instances that run on hardware that's dedicated to a single AWS account.
🌐
Amazon Web Services
docs.aws.amazon.com › amazon ec2 › user guide › amazon machine images in amazon ec2 › understand shared ami usage in amazon ec2 › share an ami with specific aws accounts
Share an AMI with specific AWS accounts - Amazon Elastic Compute Cloud
The accounts that launch instances using the AMI are billed for the instances that they launch. ... In the navigation pane, choose AMIs. Select your AMI in the list, and then choose Actions, Edit AMI permissions. Choose Private. Under Shared accounts, choose Add account ID.
Top answer
1 of 7
4

As mentioned in a comment, AWS has announced EFS (http://aws.amazon.com/efs/) a shared network file system. It is currently in very limited preview, but based on previous AWS services I would hope to see it generally available in the next few months.

In the meantime there are a couple of third party shared file system solutions for AWS such as SoftNAS https://aws.amazon.com/marketplace/pp/B00PJ9FGVU/ref=srh_res_product_title?ie=UTF8&sr=0-3&qid=1432203627313

S3 is possible but not always ideal, the main blocker being it does not natively support any filesystem protocols, instead all interactions need to be via an AWS API or via http calls. Additionally when looking at using it for session stores the 'eventually consistent' model will likely cause issues.

That being said - if all you need is updated resources, you could create a simple script to run either as a cron or on startup that downloads the files from s3.

Finally in the case of static resources like css/images don't store them on your webserver in the first place - there are plenty of articles covering the benefit of storing and accessing static web resources directly from s3 while keeping the dynamic stuff on your server.

2 of 7
2

From what we can tell at this point, EFS is expected to provide basic NFS file sharing on SSD-backed storage. Once available, it will be a v1.0 proprietary file system. There is no encryption and its AWS-only. The data is completely under AWS control.

SoftNAS is a mature, proven advanced ZFS-based NAS Filer that is full-featured, including encrypted EBS and S3 storage, storage snapshots for data protection, writable clones for DevOps and QA testing, RAM and SSD caching for maximum IOPS and throughput, deduplication and compression, cross-zone HA and a 100% up-time SLA. It supports NFS with LDAP and Active Directory authentication, CIFS/SMB with AD users/groups, iSCSI multi-pathing, FTP and (soon) AFP. SoftNAS instances and all storage is completely under your control and you have complete control of the EBS and S3 encryption and keys (you can use EBS encryption or any Linux compatible encryption and key management approach you prefer or require).

The ZFS filesystem is a proven filesystem that is trusted by thousands of enterprises globally. Customers are running more than 600 million files in production on SoftNAS today - ZFS is capable of scaling into the billions.

SoftNAS is cross-platform, and runs on cloud platforms other than AWS, including Azure, CenturyLink Cloud, Faction cloud, VMware vSPhere/ESXi, VMware vCloud Air and Hyper-V, so your data is not limited or locked into AWS. More platforms are planned. It provides cross-platform replication, making it easy to migrate data between any supported public cloud, private cloud, or premise-based data center.

SoftNAS is backed by industry-leading technical support from cloud storage specialists (it's all we do), something you may need or want.

Those are some of the more noteworthy differences between EFS and SoftNAS. For a more detailed comparison chart:

https://www.softnas.com/wp/nas-storage/softnas-cloud-aws-nfs-cifs/how-does-it-compare/

If you are willing to roll your own HA NFS cluster, and be responsible for its care, feeding and support, then you can use Linux and DRBD/corosync or any number of other Linux clustering approaches. You will have to support it yourself and be responsible for whatever happens.

There's also GlusterFS. It does well up to 250,000 files (in our testing) and has been observed to suffer from an IOPS brownout when approaching 1 million files, and IOPS blackouts above 1 million files (according to customers who have used it). For smaller deployments it reportedly works reasonably well.

Hope that helps.

CTO - SoftNAS

🌐
Hava
hava.io › home › blog › what are dedicated amazon aws ec2 instances?
What are Dedicated AWS EC2 Instances?
April 17, 2024 - AWS then provisions your virtual ... on the server, even though there may be other AWS customer virtual machines on the same piece of multi-tenant equipment. By default your EC2 instances will be provisioned on shared multi-tenant infrastructure....