<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: AntonNguyen97</title>
    <description>The latest articles on Forem by AntonNguyen97 (@antonnguyen97).</description>
    <link>https://forem.com/antonnguyen97</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F410978%2F53751fb8-1835-4d98-a200-022d861949b5.png</url>
      <title>Forem: AntonNguyen97</title>
      <link>https://forem.com/antonnguyen97</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/antonnguyen97"/>
    <language>en</language>
    <item>
      <title>How to build your own private cloud on AWS part 2</title>
      <dc:creator>AntonNguyen97</dc:creator>
      <pubDate>Fri, 04 Sep 2020 13:36:36 +0000</pubDate>
      <link>https://forem.com/antonnguyen97/how-to-build-your-own-private-cloud-on-aws-part-2-j0c</link>
      <guid>https://forem.com/antonnguyen97/how-to-build-your-own-private-cloud-on-aws-part-2-j0c</guid>
      <description>&lt;p&gt;Hi! In the &lt;a href="https://dev.to/antonnguyen97/how-to-build-your-own-private-cloud-on-aws-part-1-3fp1"&gt;previous part&lt;/a&gt;, we have created our own private cloud using VPC on AWS. If you haven't read it, make sure you do, before starting this article.&lt;/p&gt;

&lt;p&gt;So let's test our VPC. I created 3 EC2 instances in 3 different subnets, as you can see below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qsJfkdHU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yxsa4hmesohiqkixm921.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qsJfkdHU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yxsa4hmesohiqkixm921.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="//appus.software"&gt;Appus-isolated-subnet-B&lt;/a&gt; and &lt;a href="//appus.software"&gt;Appus-private-subnet-A&lt;/a&gt; do not have a public IP address, they only have private ones - 10.0.23.186 and 10.0.12.221.&lt;/p&gt;

&lt;p&gt;So let's log into our instance that has a public IP address and try to ping Google.&lt;br&gt;
 I have logged into my instance and sent some packages to Google, and as we can see it has an Internet connection:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3AMyDQeJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a1i0mfttu36fsp0vebf6.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3AMyDQeJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a1i0mfttu36fsp0vebf6.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's log into our Appus-private-subnet-A instance through a private IP address. Using the ssh command we can log into it "ssh -i your_key.pem ubuntu@your_private_ip".  Now we can ping any host.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c-a3hgd_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1a7m6n8xp5dkm3l4fzd1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c-a3hgd_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1a7m6n8xp5dkm3l4fzd1.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we can see, it is connected to the Internet through the NAT server. But the Internet can not ping our instance since it has no public IP address. So let's exit this server and log into an isolated server. &lt;br&gt;
 Using the ssh command we can log into an isolated server - "ssh -i your_key.pem ubuntu@your_private_ip".  If we try to ping any Internet host there will be no packages received.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W9uVADGl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wogj2iaovyv13qfloa9d.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W9uVADGl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wogj2iaovyv13qfloa9d.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is it, I hope this article was helpful for you!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to build your own private cloud on AWS part 1</title>
      <dc:creator>AntonNguyen97</dc:creator>
      <pubDate>Fri, 04 Sep 2020 13:35:56 +0000</pubDate>
      <link>https://forem.com/antonnguyen97/how-to-build-your-own-private-cloud-on-aws-part-1-3fp1</link>
      <guid>https://forem.com/antonnguyen97/how-to-build-your-own-private-cloud-on-aws-part-1-3fp1</guid>
      <description>&lt;p&gt;In this series of articles, I will show you how to build your own private cloud on AWS. Here, in &lt;a href="//appus.software"&gt;Appus studio&lt;/a&gt; we always put the security of applications of our clients first, so we recommend them getting their own VPC with public, private, and full isolated subnets. &lt;br&gt;
So let’s get started. Open your AWS console and search for VPC. In the left menu bar, you can find “Your VPCs”, left button click on it and all VPCs you have should be visible to you. If you haven't configured your custom one, there is always one default VPC provided by Amazon. Click on “Create VPC” and enter the name of your VPC, CIDR block (range of IP addresses that work in this VPC). In my case, I use this 10.0.0/16 it is 65,536 IP addresses minus 5 reserved by AWS. I will keep all other configurations default because I do not need them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fptxjrt4vdt0sodyrvqa1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fptxjrt4vdt0sodyrvqa1.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now our VPC is created. The next step is to configure Internet Gateway and attach it to our private cloud to have Internet access. On the left menu bar find the “Internet Gateways” tab and by default, there is just one provided by Amazon. Click on “Create internet gateway”, name it, and hit “Create”. Now it has a detached state, to attach it all we need to do is click on “Actions” -&amp;gt; “Attach to VPC” -&amp;gt; and select your VPC.&lt;br&gt;
So we have created our VPC and attached Internet Gateway to it. The next step is to create our subnets. Left click on “Subnets”. By default, it has as many subnets as your region has availability zones. We will create our subnets in two different availability zones. Hit “Create subnet” and fill out the “Name tag” box, choose your VPC, choose one of the availability zones that Amazon provides in your region and enter the CIDR block for this subnet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5876xojz7xtteztlx99o.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5876xojz7xtteztlx99o.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s configure the same public subnet but in another availability zone.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv4pi96lbbk38hlvge8ca.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv4pi96lbbk38hlvge8ca.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we need to tick auto-assign public IPv4. Choose your subnet and hit “Actions” -&amp;gt; “Modify auto-assign IP settings” -&amp;gt; “Enable auto-assign public IPv4 addresses”-&amp;gt; “Save”. These steps are for public subnets.&lt;br&gt;
Now we will modify our route table for our subnets to be able to access the Internet. Now go to “Route tables” -&amp;gt; choose your route table -&amp;gt; “Actions” -&amp;gt; “Edit routes” -&amp;gt; “Add route” -&amp;gt; Destination(0.0.0.0/0) and Target Internet Gateway and choose yours -&amp;gt; “Save routes”.&lt;br&gt;
The next step will be to create a private subnet in different availability zones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb20kcnr2dkframvkgsgw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb20kcnr2dkframvkgsgw.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And another one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsgc2n3ht75qpxcb0jrux.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsgc2n3ht75qpxcb0jrux.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When a private subnet is created we need to configure the route table for it. On the left menu bar click on “Route tables” -&amp;gt; “Create route table” and create new route tables for first and second private subnets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgvdjlelzsryt7lc84lac.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgvdjlelzsryt7lc84lac.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we need to attach this route table to our private subnet. Click on your private subnet, then “Subnet Associations” -&amp;gt; “Edit subnet associations” then choose private subnet –&amp;gt; “Save”:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fybvz0qwmy6axwhb06qvh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fybvz0qwmy6axwhb06qvh.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9i3f6nll5it42d3cnjj7.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9i3f6nll5it42d3cnjj7.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So let’s configure isolated subnets in two availability zones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjp23msfqbukjkas38814.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjp23msfqbukjkas38814.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And another one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F49k3g3gbipd0158ufjim.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F49k3g3gbipd0158ufjim.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And now we will create a new route table for our isolated subnet:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftd8lclb0kbbhynjho8hc.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftd8lclb0kbbhynjho8hc.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now attach it to our isolated subnets:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdr75m6lwfgul37ytmm9y.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdr75m6lwfgul37ytmm9y.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have come a long way. Now we will configure NAT for our access to the Internet from private subnet. Click on “NAT Gateways” -&amp;gt; “Create NAT Gateway”. NAT will be attached to public subnets and it needs an Elastic IP address. If you do not have one, just click on “Allocate Elastic IP” -&amp;gt; “Create NAT gateway”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv9s1p4zikn9ri8su3r98.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv9s1p4zikn9ri8su3r98.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need 2 Elastic IP addresses for subnets A and B. So I will create another one but with another public subnet. It will take some time for NATs to switch to the available state. If you did everything correctly you will see this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjqmb4jq1fknmo63dq1wi.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjqmb4jq1fknmo63dq1wi.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we will attach those NATs to our route tables. We will attach NAT-A to private subnet A and NAT-B to private subnet B:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1bvzrl7nau0g18wg7ib7.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1bvzrl7nau0g18wg7ib7.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And for another one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1f4fpvttm94iv8nwqp25.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1f4fpvttm94iv8nwqp25.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, we are done and here is the result of our work:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbidl27m5u7zq977mstqg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbidl27m5u7zq977mstqg.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the next part we will test our environment. See you soon! &lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Failover Architecture on AWS(Part 4/4)</title>
      <dc:creator>AntonNguyen97</dc:creator>
      <pubDate>Thu, 18 Jun 2020 15:59:18 +0000</pubDate>
      <link>https://forem.com/antonnguyen97/failover-architecture-on-aws-part-4-4-5b63</link>
      <guid>https://forem.com/antonnguyen97/failover-architecture-on-aws-part-4-4-5b63</guid>
      <description>&lt;p&gt;Finally, we are here in the last part of this article. Please make sure that you read 3 previous parts and then continue to read this one. &lt;br&gt;
In 3 last parts (&lt;a href="https://dev.to/antonnguyen97/failover-architecture-on-aws-part-1-4-mbi"&gt;part 1/4&lt;/a&gt;, &lt;a href="https://dev.to/antonnguyen97/failover-architecture-on-aws-part-2-4-1eic"&gt;part 2/4&lt;/a&gt;, &lt;a href="https://dev.to/antonnguyen97/failover-architecture-on-aws-part-3-4-2e6"&gt;part 3/4&lt;/a&gt;), we got an SSL certificate using Certificate Manager, configured load balancer, launch templates and an auto-scaling group. The last step is to attach the DNS name of the load balancer to our domain name in Route53.&lt;/p&gt;

&lt;p&gt;So navigate to Route53 and then click to your domain and then hit “Create Record set”, create the subdomain or leave just domain itself depends on what kind of an SSL certificate you own. Now, we need to choose our load balancer Alias, hit “Yes” near to “Alias” and in “Alias Target” chose your load balancer it will something like “dualstack…” and then hit “Create”. In the end you must have something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PX9NKFgT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rkegscsrqwyfgm7nx2k5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PX9NKFgT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rkegscsrqwyfgm7nx2k5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, you can type your domain into a web-browser (&lt;a href="https://your-domain.com"&gt;https://your-domain.com&lt;/a&gt;) search bar and see how load balancer works. You can clearly see which server the load balancer will send you to.&lt;/p&gt;

&lt;p&gt;Remember, all these configurations in Route53 may take several minutes to be "Live" on Internet, do not rush to be upset if your site is not working yet.&lt;/p&gt;

&lt;p&gt;In my example web-pages will look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y-4xYGRL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kl1vzvoytuy5n9ynr7yf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y-4xYGRL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kl1vzvoytuy5n9ynr7yf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y-4xYGRL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kl1vzvoytuy5n9ynr7yf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y-4xYGRL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kl1vzvoytuy5n9ynr7yf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we can see load balancer works well and our connection is secured.&lt;br&gt;
In the end of it all we have built a high availability production environment. All these will make us sure that our service will always on, auto-scaling group will be guarantor of our confidence.&lt;br&gt;
This was the easiest way to configure failover architecture on AWS. &lt;/p&gt;

&lt;p&gt;Here in &lt;a href="https://appus.software/"&gt;Appus Studio&lt;/a&gt; we have several solutions for building a more complex and extensive configuration depends on how cool and large the project is.&lt;/p&gt;

&lt;p&gt;I hope that I helped you figure out some points. Thanks for following me in the last four parts!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Failover Architecture on AWS(Part 3/4)</title>
      <dc:creator>AntonNguyen97</dc:creator>
      <pubDate>Thu, 18 Jun 2020 15:29:49 +0000</pubDate>
      <link>https://forem.com/antonnguyen97/failover-architecture-on-aws-part-3-4-2e6</link>
      <guid>https://forem.com/antonnguyen97/failover-architecture-on-aws-part-3-4-2e6</guid>
      <description>&lt;p&gt;Hi there! Let’s continue our job. By the way, if you are the new one to this I recommend you to read two previous parts, &lt;a href="https://dev.to/antonnguyen97/failover-architecture-on-aws-part-1-4-mbi"&gt;here&lt;/a&gt; and &lt;a href="https://dev.to/antonnguyen97/failover-architecture-on-aws-part-2-4-1eic"&gt;here&lt;/a&gt;. In part number three, we will create a launch template and auto-scaling group.&lt;/p&gt;

&lt;p&gt;So, go to EC2 service and on the left menu bar in the “Instances” section you can find “Launch Templates”. Click on “Create launch template”. Give a name to your launch template and a description. Then choose any AMI that you want, I will use Ubuntu Server 18.04 LTS (HVM), pick instance type, I will use t2.micro because we do not need a powerful server for this example. Then create a new key pair or choose the one that you already have. I will pick the one that was created early by me. Next, we will choose/create a security group, I will use the one that created in part number two of this article. Also, you can add more volume and network interfaces to it if you want to. For this example, I will not do it. Then click on “Advanced details” all we need here is put the script that will be processed after the system boot. &lt;br&gt;
All it does is updating the system, configure NGINX, and modify the default startup page of NGINX, start NGINX and enable it to start on system booting. Below you can find the text of the script:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oQHm8H4t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lbkv877pk0a251byws5i.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oQHm8H4t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lbkv877pk0a251byws5i.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then click on “Create launch template” button. Once you see the green checkmark “Success”, congrats launch template created.&lt;br&gt;
Ok, let’s go back to EC2 service, and on the left menu bar in “Auto Scaling” section you can find “Auto Scaling Group”. &lt;br&gt;
Now, we will create our auto-scaling group. Click on “Create Auto Scaling group” give a name to your ASG(Auto Scaling group) and choose the launch template that was created early. Check all configurations and then hit the “Next” button.&lt;/p&gt;

&lt;p&gt;On step number 2 all that we need it is to add more subnets to our ASG, we will choose each of them as I mentioned early we need high availability architecture, so instances will launch in every availability zone randomly.&lt;/p&gt;

&lt;p&gt;On step number 3 we will enable load balancing and choose classic load balancer that we configured early. Other options we will leave it by default.&lt;/p&gt;

&lt;p&gt;On step number 4 we will configure group size and Scaling policies. As the desired capacity I need 2 instances, the minimum is 2 and maximum capacity 5. For this example, I will choose the desired outcome and leave it to the scaling policy to add and remove capacity as needed to achieve that outcome. The policy name I will leave as “Target tracking Policy”, metric-type – average CPU utilization, target value equals 50. &lt;br&gt;
In this example, I will skip step number 5, in this case we do not need notifications, but you can configure it if you want to.&lt;/p&gt;

&lt;p&gt;On step number 6 we need to add tags. I will add Key=Name Value=&lt;a href="https://appus.software/"&gt;Appus Studio&lt;/a&gt; so our instances will have a name as &lt;a href="https://appus.software/"&gt;Appus Studio&lt;/a&gt;, you can give any name that you want. Then review all configurations and hit “Create Auto Scaling group” button. Now the auto-scaling group will create new instances, you can go to “Instances” and check it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hpSkr7sH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t6bc0hyhsfxa7curj26l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hpSkr7sH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t6bc0hyhsfxa7curj26l.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wait until the “Status check” will be “2/2 passed” and then you can go to load balancer section and check for instance status for balancer. Once you see the status is “2 of 2 instances in service” it means all instances have passed health check. You can check the performance of the load balancer by going through the DNS name of the balancer itself (&lt;a href="https://your-load-balancer-domain"&gt;https://your-load-balancer-domain&lt;/a&gt;). For now, the page is not secured just because the SSL certificate was issued to the domain name that you specified in part number 1 of this article. We will fix it in the next part of an article. &lt;/p&gt;

&lt;p&gt;Further, you can modify all parameters of the auto-scaling group, such as scaling strategy, use a new load balancer, etc.&lt;/p&gt;

&lt;p&gt;This is the end of this part and I’m looking forward to seeing you in the next part!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Failover Architecture on AWS(Part 2/4)</title>
      <dc:creator>AntonNguyen97</dc:creator>
      <pubDate>Thu, 18 Jun 2020 15:16:01 +0000</pubDate>
      <link>https://forem.com/antonnguyen97/failover-architecture-on-aws-part-2-4-1eic</link>
      <guid>https://forem.com/antonnguyen97/failover-architecture-on-aws-part-2-4-1eic</guid>
      <description>&lt;p&gt;In this part of an article we will create our brand new load balancer. If you are new to this I recommend you to read the first part of this article &lt;a href="https://dev.to/antonnguyen97/failover-architecture-on-aws-part-1-4-mbi"&gt;“Failover Architecture on AWS(Part 1/4)”&lt;/a&gt; to be aware of what's going on.&lt;br&gt;
So, let’s go to EC2 service and configure the Load Balancer. On the left menu bar in the section “Load Balancing” you can find “Load Balancers”. Amazon has 3 types of Load Balancers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Application Load Balancer&lt;/li&gt;
&lt;li&gt; Network Load Balancer &lt;/li&gt;
&lt;li&gt; Classic Load Balancer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The description each one of them you can find here: &lt;a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html"&gt;https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Click “Create Load Balancer” and hit “Create” on Classic Load Balancer.&lt;br&gt;
On step 1 we are going to configure Load Balancer’s name, listeners, and VPC configuration. You can give to it  any name that you want, add listeners that you need, by the default it is only HTTP port. In our case, we will only open HTTPS port, so I deleted HTTP protocol and add HTTPS protocol to it. So the Load Balancer will listen to port 443 and then forward it to port 80 to instances. Then we are going to enable advanced VPC configuration and add all available subnets because we want a high available system. In my region, it has only three, if your region has more I recommend adding all of them, also you should remember that every zone has a price for it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LGCTSSbz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vos82zhwxbls1e1z1u1c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LGCTSSbz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vos82zhwxbls1e1z1u1c.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m4vhZUZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ujb9751bhe6uv8jswaqt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m4vhZUZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ujb9751bhe6uv8jswaqt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On step number 2 we are going to configure a security group. Choose “Create a new security group” give a name to it and a description. I want to open 80, 443, and 22 ports and port 22  allows only for my IP address.&lt;br&gt;
On step 3 we will attach our SSL certificate to Load Balancer. Hit “Choose a certificate from ACM” and in the “Certificate section”, you will see your SSL certificate that requested early. In the Cipher section, I will use the predefined security policy “ELBSecurityPolicy-2016-08”. You can change your security policy but I recommend familiarizing yourself with each of the security policies provided by AWS, also you can create a custom one.&lt;br&gt;
On step number 4 we need to configure health check. It is the part when Load Balancer will ping our instances to make sure they are alive and working. Below you can see my configurations:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m4vhZUZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ujb9751bhe6uv8jswaqt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m4vhZUZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ujb9751bhe6uv8jswaqt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So these configurations tell that load balancer will ping port 80 to path “/”, response timeout will be 5 seconds, interval of pinging every 10 seconds, if 5 pings will not have a response that means the instance is not alive and automatically status of it will be “Out of service”, the healthy threshold is 5 times of successful response by instance.&lt;br&gt;
On step 5 you can see all available instances that could be picked by the load balancer, of course, if you have running EC2 instances right now, for now, I will not add any of them because we want it to pick only instances created by the auto-scaling group. All other configurations we will leave it by default. &lt;br&gt;
On step 6 I will create a tag for our load balancer with Key=Name and Value=&lt;a href="https://appus.software/"&gt;Appus Studio&lt;/a&gt;. &lt;br&gt;
On step 7 review all configurations and click on “Create” button. If you see a green checkmark that tells “Successfully created load balancer” Congrats we have done it!&lt;br&gt;
Next, we will configure launch template and auto-scaling group. All this will be described in the third part of the article.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Failover Architecture on AWS(Part 1/4)</title>
      <dc:creator>AntonNguyen97</dc:creator>
      <pubDate>Thu, 18 Jun 2020 15:06:11 +0000</pubDate>
      <link>https://forem.com/antonnguyen97/failover-architecture-on-aws-part-1-4-mbi</link>
      <guid>https://forem.com/antonnguyen97/failover-architecture-on-aws-part-1-4-mbi</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;INTRODUCTION&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Nowadays it is important to have highly accessible architecture on production servers to prevent unpleasant situations e.g. service unavailability. So, here in &lt;a href="https://appus.software/"&gt;Appus Studio&lt;/a&gt; we have some good solutions for it and in this article, I will show the easiest way to configure the failover system in AWS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let’s take a look how our sсheme will look like:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Owm_6veI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qnpzfeq8czl4ob5h34bp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Owm_6veI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qnpzfeq8czl4ob5h34bp.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, we will use services such as EC2, Route53 and Certificate Manager.&lt;br&gt;
Let’s clarify our next steps:&lt;br&gt;
       1. Request SSL certificate on Certificate Manager&lt;br&gt;
       2. Create Classic Load Balancer&lt;br&gt;
       3. Create Launch Template&lt;br&gt;
       4. Create Auto Scaling group&lt;br&gt;
       5. Attach DNS name of Load Balancer in Route53&lt;/p&gt;

&lt;p&gt;After we have outlined our action plan, we can start configuring all of this.&lt;br&gt;
So let’s request for SSL certificate on the Certificate manager. In the search toolbar enter "Certificate Manager" and click on it. Next, you have to choose to import your own SSL certificate or you can request it right here on AWS. The important thing here is you have to own domain name and make sure that you can create a recordset. &lt;br&gt;
Before requesting your certificate, you need to transfer the domain name under the management of AWS. In this article, I will skip that part and you can find a lot of information on how to do it, just  "google" it :)&lt;br&gt;
Now, I will request an SSL certificate on AWS. Choose “Request a public certificate” and then hit “Request a certificate”. Then you have to enter your domain e.g. appusthebest.com or you can generate a wildcard SSL certificate by entering *.appusthebest.com it will allow you to have as much as you want subdomains for appusthebest.com, but this certificate will not work for appusthebest.com. In my case, I will create a wildcard SSL certificate for the corporate domain and hit “Next”. For verification, I will choose “DNS validation”. Next, we will need to add a tag to our certificate, you can add anything that you want, in my case this will be Key=Name and Value=appus.thebest then left-click on “Review” and “Confirm and request”. Since the domain name is managed by AWS  this is very convenient to confirm that we are truly the owner of the domain name. All I need is to click the arrow near to the domain, then the tab comes off and then click on create a CNAME record in Route53. Once it is confirmed you can see on the Status bar “Issued”. Congrats, we just requested an SSL certificate for our Load Balancer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ERA_3vAi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v7eyrja7erb9szdqifla.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ERA_3vAi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v7eyrja7erb9szdqifla.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On this the first part of the article ends and in the next part I will show how to configure the load balancer. See you!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
