Introduction to AWS

Introduction to AWS

Who this is for

If you've recently started out in managing a cloud infrastructure, or have primarily used other providers, it is possible that you're not familiar with the intricacies of AWS.

This post is for those who might not be familiar with phrases like "Elastic IP Address", "Application Load Balancer", "Security Group", "VPC" or "EC2 Instance". If you are comfortable with those phrases, feel free to skip to the next tutorial.

Some of you might be planning on setting up a container infrastructure utilizing Amazon ECS, Fargate or Elastic Beanstalk. These tutorials will touch on those technologies in later posts - after setting up an infrastructure with traditional servers. The knowledge gained from setting up traditional servers can be directly translated into setting up a container-based infrastructure.

Let's dive into it and define a few terms!

EC2 Instances

Elastic Compute Cloud (EC2) Instances are essentially servers that you can rent from Amazon to run your code. They utilize VM technology that makes it easy to create and destroy environments running Linux and other operating systems.

AMI

Amazon Machine Images (AMI) are a snapshot of a machine at any given point in time. If you create a Linux server and install Ruby and MySQL on it, you can save a snapshot that allows you to more easily create a server with that configuration in the future.

Auto-Scaling

Auto-scaling is a tool that monitors web applications and decides when to add or subtract instances within the infrastructure, based on usage. If your web application suddenly gets a burst in traffic, auto-scaling makes sure, without manual intervention, that there are enough servers to handle it. If traffic dies down on the weekends, auto-scaling will use less servers (and by extension cost less) on the weekends.

Security Group

Security Groups allow you to create rules for which ports can be accessed, and from where. For example, if you wanted only your IP address to be able to SSH into a server, you'd manage that through Security Groups.

Elastic IP Address (EIP)

Elastic IP Addresses (EIP) are IP addresses that you can purchase from Amazon and attach to EC2 instances. These IP addresses can be used to point domain names at your rented servers. The ability to attach and detach them allows you to upgrade your servers without changing your DNS.

Application Load Balancer

When managing multiple servers, or deploying multiple times a day, it becomes beneficial to send all traffic through a load balancer. A load balancer is a layer in between your servers and the internet that decides which server a given request will go to. It can be beneficial for heavy traffic, overloaded servers or no-downtime deploys.

Availability Zone

Amazon has multiple datacenters spread throughout the world. An Availability Zone represents an isolated data center. Placing servers in multiple zones means that if one data center ever fails, your web application can remain online.

VPC

A virtual private cloud (VPC) is a private network in which you can place your servers. All servers within the virtual cloud are given private IP addresses that allow for faster and more secure communication between them. You can split a VPC into subnets spread across multiple availability zones.

Putting it all together

These terms should help to make things more understandable while we're setting up our infrastructure. Don't worry if you haven't quite memorized them yet. After using them in practice, these terms become second nature.

Throughout the rest of this tutorial series, we're going to use Terraform to put these pieces together into a production web application!

Creating an EC2 Instance with Terraform

Creating an EC2 Instance with Terraform

Introduction to Terraform

Introduction to Terraform