Amazon EC2 is the most popular service from Amazon Web Services and a great general AWS introduction.
The team at AWS constantly improves its Amazon EC2 service by iterating around key offerings such as new instance types, new operating systems, new security features and other enhancements. I believe you’ll find these 5 features useful in your daily life. I worked hard to explain the advantages and drawbacks as clearly as possible. You might disagree with me on some points and if you do, I’d love your feedback.
The New Amazon EC2 Service Feature:
1) New VM Import Options for EC2
Previously it had been a challenge for AWS enterprise customers to use the existing virtualized infrastructure: golden images, importing VMs, deployment process, and licenses. AWS addressed these issues by introducing AWS VM Import/Export and AWS Management Portals for vCenter.
In December 2015, AWS enhanced many features of the above two services by importing multi-volume VMs to EC2 from the AWS Management Portal for vCenter supporting SUSE/SLES 11-12, Oracle Enterprise Linux 6-7, Fedora 19-21, Windows 10 flavors of OSes. However, you need to upgrade the portal or use the latest version of the portal to make these upgrades work.
2) EC2 t2.nano Instance
Amazon introduced a new instance type called t2.nano in the t2 instance family. The introduction of t2.nano was intended to be used by low-traffic websites, microservices, and for dev/test environments with a very low cost. Each t2.nano instance has 512 MiB of memory and 1 vCPU and can run 32 or 64 bit operating systems and applications. These instances support EBS encryption and up to 2 Elastic Network Interfaces per instance that you can use with AWS CloudFormation. Currently, t2.nano instances are available in the following regions: US East (Northern Virginia), US West (Oregon), US West (Northern California), Europe (Ireland), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (Brazil), and AWS GovCloud (US) regions. Cost is also a compelling reason to use an EC2 t2.nano instance because the per hour price goes as low as $0.0065 for on-demand and a yearly reserved instance cost of $3.125 per month. If you select a 3 years reserved instance the cost comes down to $2.10/month.
3) Instance Protection for Auto Scaling
Autoscaling in AWS EC2 helps you to meet resource demands rapidly. Autoscaling adjusts the EC2 instances during spikes in traffic and scales down when the demand drops off.
AWS has enhanced Autoscaling by providing Instance Protection, which prevents the servers from terminating during the scale-in phase. You have may have many such requirements where you do not want to terminate a particular instance. For example, you have an instance where both app server (e.g. JBoss) and FTP servers are installed and you don’t want either one to be de-commissioned. Or, perhaps, you have an Hadoop master node which is the single point of failure in cases of termination. There are many such examples and it depends on your design and judgment which server needs to be prevented from termination during scale-in.
4) EC2 Dedicated Hosts
In Nov 2015, AWS announced the availability of dedicated hosts. Dedicated hosts are physical servers running underneath everything the with capacity of hosting one or more EC2 instances. But the question is why do we need to use Dedicated Hosts? Assume that you have existing licenses for Oracle Databases and the licenses are usually applied on a server with a certain number of sockets or physical cores. This model works for Oracle licenses as well as licenses for Windows Servers, SQL Servers, and SUSE Linux Enterprise Servers. For these kinds of licenses, AWS introduced dedicated hosts that map these licenses in AWS EC2 instances when you use BYOL (Bring Your Own License). This model allows you to allocate an actual physical server (the Dedicated Host) and then launch one or more EC2 instances of a given type on it. You will be charged for the hosts and not the instances you launch on the dedicated host. With dedicated hosts, you can launch M3, M4, C3, C4, G2, R3, D2, and I2 instances which you must specify while allocating a host.
In addition to allowing you to Bring Your Own License, Amazon EC2 Dedicated Hosts can help you to meet stringent compliance and regulatory requirements, track usage with AWS Config, and control over instance placement at the physical host level.
Let’s take a look at how dedicated host provisioning looks and discuss what each of the parameters mean.
Instance Type: You select a specific type of instance that can be launched on a dedicated host. Remember, you can only launch your specified instance type that you have configured.
Availability Zones: AZ where the dedicated host and its hosted instances will be located.
Allow instance auto-placement: When it is ON, the subsequent launch of the instances will be placed in this dedicated host until it has the needed capacity. Otherwise, you must specify the host.
Quantity: Number of dedicated hosts you want to purchase with this configuration.
Once you allocate host, it will be created and a Host ID generated. The following table shows what kind of dedicated host will be allocated for a particular instance type.
In our configuration, we will receive a dedicated host with 2 sockets and 20 cores that can host 16 m3.large instances. The rests of the steps are as follows:
- From the dedicated host dashboard, select a dedicated host and click on the Actions button. It will allow you to launch instances with an option “Launch Instance(s) onto Host”.
- Select the AMI and the Instance Type (It will only allow the Instance Type you have named during allocation of the host i.e. m3.large in our case).
- The instances launched in a Dedicated Host must reside in a VPC. A single Dedicated Host can contain instances from more than one VPC.
- Selecting Affinity will make sure that the instance will restart on the same host. This is ideal when you do not want the licensed software to run on the wrong host.
An important word of caution, when you launch instances in a Dedicated Host, you do not use the autoscaling feature. Moreover, the Placement Groups in VPC and RDS are not supported.
The pricing structure is as follows. Dedicated Hosts are available with on-demand pricing only with a future roadmap which make this model available for reserved pricing.
5) EC2 Run Command for Linux Instances
In earlier releases of the Amazon EC2 Run command, the support was for Windows instances only. This support offered the administer more than one Windows instances, including installing software, running ad-hoc scripts (Microsoft PowerShell commands), configuring Windows Update settings, and more.
The new Amazon EC2 service features offer the EC2 Run command for Linux instances. Run Command makes use of an agent (amazon-ssm-agent) that runs on each instance. It is available for the following Linux distributions:
- Amazon Linux AMI (64 bit) – 2015.09, 2015.03, 2014.09, and 2014.03.
- Ubuntu Server (64 bit) – 14.04 LTS, 12.04 LTS
- Red Hat Enterprise Linux (64 bit) – 7.x
Here are some of my favorite things that you can do with the Run Command:
- Run shell commands or scripts
- Add users or groups
- Configure user or group permissions
- Start, stop, view all running services
- View system resources & log files
- Install or uninstall applications
- Update a scheduled (cron) task
This feature is available in the US East (Northern Virginia), US West (Oregon), and Europe (Ireland) regions only at this time. There’s no charge for the command, but, as always, you will be billed for other AWS resources that you consume. Eugene Teo has a good blog from December that provides excellent background on this topic SELinux: improve the security of your EC2 servers.
AWS is vibrant, speaks to customers, and take their feedbacks seriously. The team at Amazon Web Services create amazing features and services that make our jobs easier — and more fun. That’s why AWS is the leader in the Cloud industry according to Gartner. I invite you to offer comments, questions and thoughts by starting a discussion below. Beginners who are hungry for greater understanding should take a look at the Cloud Academy course, Amazon EC2 (Elastic Cloud Compute): how to launch you instance in minutes. Cloud Academy offers a standard 7 day trial so, maybe check it out and let us know what you think. We welcome your feedback because we never stop learning and hope you don’t either.