AWS instance storage pricing and selection & Reserved Instance - amazon-ec2

Storage
Trying to launch an Ubuntu 13.10 Amazon AWS instance I’ve started with a General Purpose m1.medium instance with 1x410 GB instance storage. When I come to tab 4: Add Storage it says 8 GB on the root device and N/A on another device called Instance Store 0. However I can increase the root device to up to 1024 GB. I can also change the Instance Store 0 to an EBS and get 1024 GB there.
How am I able to select more space than I have available (410GB)? Am I charged for that? Where can I see how much of each of my instances are costing? If I set the root device to 410GB will I then be charged exactly as on the Amazon list?
Reserved Instance
I also have purchased a Reserved Instance. How can I verify that the EC2 instance I have just created is actually using my reserved instance?

Storage
You have two storage options with instances. EBS and Instance storage:
EBS is somewhat like an SAN volume. It exists outside of the instance and is accessed via dedicated ethernet (This is shared between instances based on IO priority). Volumes are billed based on the provisioned size. It does have some benefits over instance storage in that it can be easily snapshotted and moved from instance to instance. EBS limits are practical ones, while you can attach quite a few volumes (up to 1TB each) the available bandwidth will likely be saturated before you can take advantage of all of them.
Instance storage is a disk attached directly to the host hardware. Its included in the instance cost. But it should not be treated as persistent. You will loose any data stored on this volume if your instance is stopped or fails for any reason. This is because at each boot, your instance is assigned to available host in a pool instead of being locked to a specific host.
You can use both types of storage on any instance (Except micro, no instance storage available). Instance storage options however need to be set at launch and can't be changed later. EBS volumes can be added/removed at any time. In most cases, instance storage is disabled by default and needs to be explicitly enabled. Helps avoid the situation of "Why did all my data get deleted?"
Reserved Instance
Reservations are a billing feature. As long as your instance matches the parameters of the reservation you will be billed at the reservation rates. Should be able to verify this with account activity.

Related

What Exactly is NVMe on AWS?

I have been combing through AWS webpages but am not sure exactly what the NVMe storage is used for.
From my research NVMe stands for non volatile memory express but it also seems like NVMe does not persist through stopping of the instance? Kind of confusing naming.
Why would one use NVMe over regular SSD storage?
Ephemeral disks -- also called Instance Store volumes -- whether NVMe or SATA SSD or HDD -- don't persist across an instance stop/start because that action deallocates the hardware associated with the instance on stop and reallocates it on start. The instance store is also wiped, so that the next instance to receive that hardware can't access what you stored. In EC2, content on NVMe drives is also transparently encrypted, with service-managed keys, and the encryption keys are wiped when the instance is stopped.
These volumes do persist across a normal reboot, just not a stop/start. When you "stop" an EC2 instance, the billing for the instance also stops, because a stopped instance exists only logically -- not physically. A stopped EC2 instance is assigned to no physical equipment.
Some instance types use NVMe or SATA-based solid state drives (SSD) to deliver high random I/O performance. This is a good option when you need storage with very low latency, but you don't need the data to persist when the instance terminates or you can take advantage of fault-tolerant architectures. For more information, see SSD Instance Store Volumes
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html
NVMe is very high performance, but instance store volumes are (by design) not fault tolerant and not intended for use with data that can't be replaced (though of course, you can RAID them on machine types with more than one ephemeral disk). Unlike EBS volumes, which are network-attached storage (offering both SSD and magnetic types), are redundant, and support snapshots, the instance store is physically inside the host machine and these don't support snapshots. Kind of a classic trade-off. They're excellent for swap space and temporary files as well as other purposes mentioned at the links above.
As noted in the EC2 documentation, not all instance types offer ephemeral disks. On many smaller instance types, this isn't a choice that you need to make.
The "non-volatile" in NVMe is a name given to the technology in the storage industry, not really applicable to the way they are used in EC2.

Sharing of resources on AWS

I am interested in understanding the way in which the hardware resources (CPU, disk, network, etc.) of an AWS physical server is shared between different applications. Do people have experiences about inexplicable performance changes in services running on AWS that you have successfully attributed to another application sharing the physical resources? If so, how did you go about debugging this?
In particular, I am interested in more complicated interactions between the resources, such as CPU->Memory bandwidth. If you run 15 VMs on a single machine, you will surely have worse performance than if you ran 2 VMs.
Perhaps this is a more general question about Xen virtualization, but I don't know if there is some kind of AWS magic happening under the hood that I don't know about.
I am not sure if this is the right forum for this kind of question; if not, it would be helpful if you could point me towards a resource or another forum.
Amazon EC2 instances are not susceptible to "noisy neighbour" problems.
Based upon the Instance Type selected, the EC2 instance receives CPU, Memory and (for some instance types) locally attached disk storage. These resources are dedicated to the instance and will not be impacted by other users nor other virtual machines. (An exception to this is the t1 and t2 instance types.)
Specifically:
The instance is allocated a number of vCPUs. These are provided to the instance and no other instance can use these vCPUs (see note about t1 and t2 below). The EC2 Instance Type page defines a vCPU as:
Each vCPU is a hyperthread of an Intel Xeon core for M4, M3, C4, C3, R3, HS1, G2, I2, and D2.
The instance is allocated an amount of RAM. No other instance can use this RAM. There is no oversubscription of CPU nor RAM.
The instance might be allocated locally-attached disk storage, known as Instance Store or Ephemeral Storage. This disk storage does not persist when the instance is Stopped or Terminated, so only store temporary data or data that is replicated elsewhere.
The instance is allocated network bandwidth that is dedicated to that instance. No other instance can impact this network bandwidth. The network performance is based upon the selected instance type. Basically, larger instances receive more network performance.
None of the above factors are impacted by other instances (virtual machines) running on the same host.
t1 and t2 instance types
An exception to the above statement are:
t1.micro instances "provide a small amount of consistent CPU resources and allow you to increase CPU capacity in short bursts when additional cycles are available".
t2 instances provide burst capacity based upon a system of CPU Credits. CPU Credits are earned at a constant rate depending upon instance type, and these credits can be used to burst the CPU when necessary.
For both these instance types, I would assume that this burst capacity is shared between instances, so it is possible that CPU burst might be impacted by other instances also wishing to burst. The t2 instances, however, would make this 'fair' by only consuming CPU credits when the CPU did actually burst.
Dedicated Instances and Dedicated Hosts
Dedicated instances are "Amazon EC2 instances that run in a virtual private cloud (VPC) on hardware that's dedicated to a single customer." Basically, your AWS account will be the only account running instances on that host computer.
A Dedicated Host is a "physical server with EC2 instance capacity fully dedicated to your use. Dedicated Hosts allow you to use your existing per-socket, per-core, or per-VM software licenses, including Windows Server, Microsoft SQL Server, SUSE, Linux Enterprise Server, and so on." Basically, you pay for the entire host computer and then launch individually instances on the host (at no additional charge).
The use of a Dedicated Instance or a Dedicated Host has no impact on resources allocated to each instance. They would receive the same resources as when running as a normal Shared Instance.

Upgrade AWS ec2 ebs instance to a reserved instance

Just upgraded and have no idea how to migrate my existing m1.small instance to a reserved m3.medium instance.
I upgraded because my server was running slow. Would it be possible to give me a step by step on how to migrate my original instance over to the reserved one?
I'm using the ec2 dashboard. From what I've read I create a snapshot, but that's how far I've got. Thanks in advance
A Reserved Instance on Amazon EC2 is a means of reducing the hourly cost of using EC2. In exchange for an up-front payment, the hourly charge for EC2 is reduced.
A Reserved Instance has several components:
Instance type (the size of EC2 instance, consisting of an family, CPU count and RAM size)
Operating System (eg costs vary for Windows vs Linux)
Availability Zone (used to ensure that capacity has been allocated)
Each hour, the AWS billing system looks for any running instances in an account that owns Reserved Instances. If any of the running instances match the above three attributes, then the instance will receive the pricing discount. (Only one instance will receive a discount per Reserved Instance per 'running' hour.)
It is not possible to select a specific Amazon EC2 instance and designate it as a Reserved Instance. The billing system does this automatically. Thus, an instance could be discounted one hour and not another hour, depending upon what other instances are running. Think of it as a billing discount rather than a particular instance being "the" Reserved Instance.
Reserved Instances are also shared across AWS Accounts that are connected via consolidated billing. If there is no matching instance to receive a discount in the AWS Account that owns the Reserved Instance, the billing system will attempt to allocate it to a matching running instance in a linked AWS Account for that hour.
Therefore, to make use of your new m3.medium Reserved Instance via the AWS management console:
Stop your existing m1.small instance
From the Actions menu, select Instance Settings / Change Instance Type
Select m3.medium
Start your instance
Make sure that your instance matches the Instance Type, Availability Zone and Operating System listed in your Reserved Instance and you will automatically receive the billing discount. If multiple running EC2 instances match the profile of the Reserved Instance, only one will receive the discount.
There is no need to create an EBS snapshot or create a new instance. Simply changing the instance attributes to match the Reserved Instance is sufficient.
Note: The Reserved Instance itself will not provide any speed improvement. It is just a billing discount. It is your choice of a larger instance type will provide the benefit.
See also:
Reserved Instance documentation
Resizing your instance

ec2 high storage instances, can it be used for couchdb or other db

As far as I know instance storage on ec2 is ephemeral ie it is lost when the instance is restarted. Is this different for high storage instances? if not it would seem that you would lose any database data stored on the instance upon restart.
Ebs backed volumes should be used for storage. Either you can take standard storage or iops. This will avoid any data losses due to instance going down.
When you attach the ebs volume to instance, make sure a entry is made to fstab file. So when you reboot the instance the volume is still attached. When you stop an instance, the data is present but the hardware is released while reboot is just like your system restarts.
All ephemeral storage is lost if the instance is stopped. You can still use a database with the high IO storage instances, but you will need to replicate the data between several instances to attain persistence.

Stopping an Amazon EC2 Instance

If I stop an instance, I understand that I am not charged. However, I've installed several items on my machine in the last few hours (Mysql uploaded a db, Apache, PHP, etc...). I assume that when I stop the instance I retain these software installations, correct? Are these things stored in EBS? If so, where is the pricing listed for EBS, as I guess I will be charged every hour of every day for the whole year for my EBS storage given that it can never "stop"...
Thanks in advance.
From http://aws.amazon.com/ec2/pricing/, the current rates are:
$0.10 per GB-month of provisioned storage
$0.10 per 1 million I/O requests
Your data will persist if the root device is EBS backed, which is default now. You can check in the EC2 control panel.
So stopping the instance (if 8GB EBS) will cost about $0.80 per month for storage if it is never running.
If your instance is EBS backed all data is safe. You will be charged for EBS storage only. Amazon EBS storage charged on per-month basis. Currently it's $0.10 per GB-month.

Resources