Implementing and Testing AWS EC2 Auto Scaling

Implementing and Testing AWS EC2 Auto Scaling

This tutorial is going to walk you through the configuration of auto scaling and to test it actually works. Although configuring auto scaling is fairly simple once you know how to do it there are a series of steps you need to do in order and I will cover those off here.

One of the benefits of using cloud infrastructure is the ability to deploy and scale up or down really easily. Auto scaling in AWS EC2 allows you to flex your infrastructure based on demand. You are also able to include auto scaling groups in AWS CloudFormation templates.

This tutorial is going to walk you through the configuration of auto scaling and to test it actually works. Although configuring auto scaling is fairly simple once you know how to do it there are a series of steps you need to do in order and I will cover those off here.

Step 1: Build an EC2 instance and create an Amazon Machine Image (AMI)

I wanted to create a very quick instance and image for this tutorial. If you are going to follow the steps with me this is what you need to do…

  • Click “Launch Instance
  • On Step 1: Select “Ubuntu Server 20.04 LTS (HVM), SSD Volume Type
  • On Step 2: Select t2.micro (free-tier)
  • On Step 3: Make sure “Auto-assign Public IP” is set to “Enable
  • On Step 3: Include this provisioning script under “Advanced Details”, “User data”:
#!/bin/bash

apt-get update -y
apt-get upgrade -y
apt-get install apache2 stress -y
systemctl start apache2
systemctl enable --now apache2

Installing “stress” is important for this tutorial but normally you wouldn’t include it. It will allow you to stress the instance to allow the auto scaling to trigger.

Although I have not used it myself I know Netflix have their own stress testing tool called “Chaos Monkey”. It looks pretty interesting and worth checking out.

  • Steps 4 and 5: Leave defaults
  • Step 6: Create a security group called “acl-web-in” with the same description. Leave the default SSH rule in to allow you to access your instance but add an HTTP rule as well.

tutorial ec2 autoscaling aws cloud-computing

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Multi-cloud Spending: 8 Tips To Lower Cost

Mismanagement of multi-cloud expense costs an arm and leg to business and its management has become a major pain point. Here we break down some crucial tips to take some of the management challenges off your plate and help you optimize your cloud spend.

Types of EC2 Instances in AWS | AWS EC2 tutorial | AWS Cloud

This Edureka Live session on ‘Types of EC2 Instances in AWS’ will give a complete walkthrough of AWS EC2 service and tell you what are the various types of EC2 instances available and how instances work in AWS. Types of EC2 Instances in AWS | AWS EC2 tutorial | AWS Cloud | AWS CLI Tutorial

AWS and Cloud Computing For Dummies

A beginners guide to what is Cloud Computing and AWS. This is going to be an introductory article for beginners who don’t have any prior knowledge of AWS or cloud services. The article is meant to develop an understanding for those new to the domain of cloud computing.

Amazon EC2 for Dummies — Virtual Servers on the Cloud

Beginner’s guide to Amazon EC2. Learn about the concepts, features, and major components of the EC2 service. If you are new with cloud computing read my article AWS and Cloud Computing For Dummies to better understand what is cloud computing.

Getting Started With AWS EC2 | EC2 Instance In AWS | AWS EC2 Tutorial

Getting Started With AWS EC2 | EC2 Instance In AWS | AWS EC2 Tutorial will help you understand everything you need, to get started with AWS EC2 Service. What are Computation Services in AWS? What is AWS EC2? What are AWS EC2 Instance Families?