A discussion about the basics of Amazon Web Services (AWS)
A discussion about the basics of Amazon Web Services (AWS) and how hosting on AWS differs from traditional dedicated server hosting.
Andrew Dixon, Technical Director
For the third North Kent Web Developer Meetup, held on Wednesday 9th March 2016 at the mso office, we decided to have a roundtable discussion about the basics of Amazon Web Services (AWS), how hosting on AWS differs from traditional dedicated server hosting and what additional services and functionality AWS offers.
Instead of having a traditional “talk” we decided to try a more interactive “roundtable” discussion approach giving everyone the opportunity to ask questions as we went and chip in with any additional information that was useful to the group. Led by mso technical director Andrew Dixon and lead developer Simon Hooker we talked about each of the main AWS service offerings and discussed them as a group. This format worked well and everyone at the meetup found it very helpful.
The services we discussed were:
EC2 – Elastic Cloud Compute
EC2 is probably AWS’s best known service and allows you to run virtual servers within Amazon’s infrastructure around the world. The EC2 service allows you to select from one of many blank images running either Microsoft Windows or a range of Linux flavours or a pre-configured image from a huge range of different software suppliers. You can then select from a large range of instance types from a “nano” server with a very small amount of resources to extremely large instances with a massive amount of resources available to them. Instances can be started and stopped at will and charges only apply while the instance is “on” allowing you to control your costs. EC2 also offers additional services giving even more flexibility to you such as elastic IP addresses, elastic load balancers and auto scaling, where you can automatically add and remove instances from a cluster dynamically based on predefined monitoring triggers such as load average, latency and so on.
The RDS service is a fully managed database service offering Microsoft SQL, MySQL, MariaDB, Amazon Aurora and PostgreSQL databases. Like EC2 you get to choose the instance type you wish to run, again from small to very large instances, depending on your requirements. There are also a range of versions for each of the different database systems available to select from. Arguably the most useful feature of RDS is the “Multi-AZ” function which allows you to have a DB instance running across multiple AWS availability zones and automatically failover if anything stops working with the “master” instance. An RDS instance using the multi-AZ feature can also use the failover for reboots, applying patches and changing instance type or storage space, meaning these tasks can be carried out with virtually no downtime at all.
S3 is another very well known service in the AWS family and offers unlimited storage for objects up to 5TB (terabytes) in size each, so basically anything. Objects are stored within “buckets” that live within a particular AWS region and can be used to serve files via http, making it possible to host a static website on S3. S3 allows very granular control over how objects can be accessed via policies which can be a simple as “allow everyone access to everything” to extremely complex policies where control over individual objects is specified.
CloudFront is Amazon’s content delivery network (CDN), allowing you to cache static files on a local edge and serve them to your users from a location closer to them than your source, be that an EC2 instance, S3 bucket or server hosted outside of AWS. CloudFront has various options for how long content is cached, how it deals with origin server headers, query strings, etc… giving you full control over how it works.
Route 53 is Amazon’s globally distributed DNS service, designed to work closely with the other AWS services, however it can be used just as a general DNS service as well. Route 53 allows you to configure all the standard DNS entries as well as some more complex routing to allow you to send users in different parts of the world to different servers based on their location and the location of the servers (geo-routing).
SES is a managed SMTP (outbound email) service on AWS. As with most of the other AWS services the SES service can be used either with the other AWS service or from an external server. If used from an EC2 instance the first 60,000 email sent per month are free. The SES service offers good whitelisting with the major email service providers, such as Gmail, Yahoo Mail and Outlook.com, including spam and bounce feedback reports either as an email or via a web request to an endpoint you specify.
AWS offers two ways to configure and interact with its services either via the API or the AWS console which is a web based tool. Most of what can be done via the API is available in the console, however as the console is based on the API, new functions are often available in the API before they are available in the console. The delay between it appearing in the API and being available in the console is however often not very long. The two options however offer maximum flexibility as you are able to easily configure services via the console with little knowledge with the API allowing you to programmatically make changes, start and stop services, etc… directly from your application.