Deploying an EC2 instance to an AWS Local Zone can seem daunting. Follow Darcy DeClute of Scrumtuous Inc in this step-by-step tutorial on how to deploy low latency apps to AWS Local Zones. Learn how to enable your local group, add your subnet, validate your deployment, and other necessary steps to successfully deploy applications.
Hi, I’m Darcy DeClute, and I want to show you how easy it is to deploy an EC two instance into an AWS local zone, the Denver local zone to be exact. But first, I want to let you know that there’s a full in depth article on this topic over on techtarget. So click on the link if you need more details. To start, login to the AWS Management Console and go to the EC two dashboard. Then click the zones link on the right hand side. Local zones are disabled by default. So to enable Denver, click Manage, select Enabled and then click Update zone group.
Confirm your decision and when the page refreshes, you’ll see the Denver local group enabled. The next step is to extend your virtual private cloud into the new region. If you look at the resource map for your VPC, you’ll notice there are subnets for each AWS region in the zone, but none for Denver. So add one by clicking on the subnets link on the left and then the Create subnet link on the right. Select the VPC for the region and then name the subnet Denver subnet. Choose the Denver subnet for the availability zone and then set a valid block number. I’m going to use one seven 2.3 1.14 8.0 slash 20.
When you’re done, click Create subnet to finish. When you return to the dashboard, you’ll see that the VPC has extended into Denver to deploy into the new local zone, go back to the EC two console. When the EC two dashboard comes up, click the Launch Instance button namely instance Denver fanclub. Select the default Amazon AMI choose the T three medium instance type and select a key pair for authentication. In the network section, select the option to allow HTTP traffic and then click Edit. Select Denver as the preferred subnet. This puts the server in the local zone give the VM a public IP address, and then click Launch Instance to go live with the Denver fan club. To validate the deployment, click the Connect to Instance button copy the shell command and paste it into PowerShell.
This will log you into the VM install the nginx web server with the following command sudo Amazon Linux extras install engine X one then start the instance with sudo systemctl start Nginx. Go back to the instances dashboard and click Open address. Remove the SSL reference and you’ll see the nginx landing page running on the public IP and that’s how easy it is to deploy an EC two instance into an AWS local zone