<?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: Clinton Ogechi</title>
    <description>The latest articles on Forem by Clinton Ogechi (@clintt).</description>
    <link>https://forem.com/clintt</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%2F816786%2F7a952140-5234-45da-a0ba-bf915187bf84.jpg</url>
      <title>Forem: Clinton Ogechi</title>
      <link>https://forem.com/clintt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/clintt"/>
    <language>en</language>
    <item>
      <title>DevOps Stage 0 - Setting Up NGINX on Ubuntu</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Fri, 31 Jan 2025 15:53:11 +0000</pubDate>
      <link>https://forem.com/clintt/devops-stage-0-setting-up-nginx-on-ubuntu-2604</link>
      <guid>https://forem.com/clintt/devops-stage-0-setting-up-nginx-on-ubuntu-2604</guid>
      <description>&lt;p&gt;As we kicked off Stage 0, I was tasked with setting up and configuring an NGINX web server on a fresh Ubuntu instance. This process helped me deepen my understanding of how web servers work and how crucial they are for serving web content in a production environment. Here’s an overview of my experience, challenges faced, and how this task fits into my overall professional goals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Approach to Completing the Task
&lt;/h2&gt;

&lt;p&gt;The task required me to install the NGINX web server, configure it to serve a custom HTML page, and ensure it was running properly. Below are the steps I followed:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Server Setup:&lt;/strong&gt; I started by setting up a fresh Ubuntu instance on a cloud provider, I choose AWS as my cloud provider. Once the instance was up and running, I SSHed into it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.Installing NGINX:&lt;/strong&gt; The first step was to install NGINX. I used the following command to install it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt install nginx -y

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Configuring NGINX:&lt;/strong&gt; After installation, I created a simple HTML page with the message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Welcome to DevOps Stage 0 - Clinton Ogechi/Clinton Ogechi

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I placed this file in the /var/www/html directory, ensuring NGINX was properly configured to serve this page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Firewall Configuration:&lt;/strong&gt; I checked that my firewall allowed traffic on port 80 (HTTP) and blocked unnecessary ports such as 8080 and 443.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Testing and Validation:&lt;/strong&gt; Finally, I was able to access the website using the server’s public IP address via &lt;a href="http://34.239.118.252/" rel="noopener noreferrer"&gt;http://34.239.118.252/&lt;/a&gt; to confirm that the custom message appeared as expected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj0c69cd4w3emzqs3e8vg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj0c69cd4w3emzqs3e8vg.png" alt="Image description" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges Faced and Solutions&lt;/strong&gt;&lt;br&gt;
While completing this task, I forgot to enable the firewall after configuring the rules with UFW. This meant that the server was not blocking ports 8080 and 443 as intended. I resolved this by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw enable

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Contribution to My Learning and Professional Goals&lt;/strong&gt;&lt;br&gt;
This task was an essential step in my journey to becoming proficient in DevOps. By setting up NGINX, I gained practical experience in configuring web servers, which is a foundational skill in DevOps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br&gt;
If you're looking into kick starting your career as a DevOps or as a Cloud Engineer, check out the links below;&lt;/p&gt;

&lt;p&gt;DevOps Engineers - &lt;a href="https://hng.tech/hire/devops-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/devops-engineers&lt;/a&gt;&lt;br&gt;
Cloud Engineers - &lt;a href="https://hng.tech/hire/cloud-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/cloud-engineers&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Amazon RDS Read Replica</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Tue, 17 Sep 2024 01:17:08 +0000</pubDate>
      <link>https://forem.com/clintt/amazon-rds-read-replica-fe5</link>
      <guid>https://forem.com/clintt/amazon-rds-read-replica-fe5</guid>
      <description>&lt;p&gt;A Read Replica allows you to offload read-heavy workloads from your primary database, significantly improving efficiency and reducing latency.  Here's a quick overview of setting it up:&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step-by-step guide&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create VPC&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a VPC with an IPv4 CIDR block (e.g., &lt;code&gt;10.0.0/16&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46bneo0hwa5y6kc8uup0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46bneo0hwa5y6kc8uup0.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Create Subnets&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a public subnet and two private subnets in different availability zones (AZs).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8phe1x7k4l8luqi6ftiv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8phe1x7k4l8luqi6ftiv.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Create Route Tables&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set up a public route table for internet access and associate it with the public subnet.&lt;/li&gt;
&lt;li&gt;Create a private route table for private subnets without external access.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxenylxl139mo8fxi7kdw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxenylxl139mo8fxi7kdw.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvmc0kp8bikmtrnzo9z5t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvmc0kp8bikmtrnzo9z5t.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Create an Internet Gateway&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create and attach the Internet Gateway to your VPC to allow the public subnet to access the internet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F777rp3ju9p9v0hudufcf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F777rp3ju9p9v0hudufcf.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxcb1aulnrslfjf612h1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxcb1aulnrslfjf612h1u.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Launch an EC2 Instance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Launch an EC2 instance in the public subnet, allowing for SSH and web access.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63f4wn17fu5omwp7rgby.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63f4wn17fu5omwp7rgby.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fonuoaenbbpsps0y3j67e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fonuoaenbbpsps0y3j67e.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Create an RDS Instance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an RDS instance (e.g., MySQL) in the private subnet, which will not be publicly accessible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvten8e8o1q4tb4dual21.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvten8e8o1q4tb4dual21.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqhxb1fe6jaioylj03te6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqhxb1fe6jaioylj03te6.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzvrxjawpbm0nq1gwodb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzvrxjawpbm0nq1gwodb.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4er72runagu15sc6ozcb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4er72runagu15sc6ozcb.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7: Set Up Security Groups&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create security groups for the EC2 instance (allow SSH and HTTP/HTTPS) and RDS (allow traffic from the EC2 instance).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 8: Test Connectivity&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SSH into the EC2 instance and verify connectivity to the RDS instance using the private IP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmg573ez8m3g6zns8xhj5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmg573ez8m3g6zns8xhj5.png" alt="Image description" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvmdufx00ib6onnl6ktu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvmdufx00ib6onnl6ktu7.png" alt="Image description" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fne6nveurz82jjfkuie00.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fne6nveurz82jjfkuie00.png" alt="Image description" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqeflz4a5pfb31jffuilr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqeflz4a5pfb31jffuilr.png" alt="Image description" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 9: Create a Read Replica&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set up a Read Replica for the RDS instance by selecting the "Create Read Replica" option from the RDS dashboard.&lt;/li&gt;
&lt;li&gt;Configure replica settings such as DB instance identifier, class, storage type, and security group.&lt;/li&gt;
&lt;li&gt;Ensure the Read Replica is placed in the correct VPC and subnet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Famu2zh1uakcdolmsyemu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Famu2zh1uakcdolmsyemu.png" alt="Image description" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsycgp4cfng1lxngudcz4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsycgp4cfng1lxngudcz4.png" alt="Image description" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0by9sngmobkdfzt34fjj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0by9sngmobkdfzt34fjj.png" alt="Image description" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Implementing a Read Replica in Amazon RDS is a powerful way to scale database workloads, particularly in environments with high read traffic. By offloading read queries to a replica, the performance of the primary database improves significantly, leading to enhanced scalability and reduced latency. This setup is especially useful for applications that need to handle large volumes of data without compromising performance.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>AWS Snow Family</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Sun, 08 Sep 2024 21:56:40 +0000</pubDate>
      <link>https://forem.com/clintt/aws-snow-family-875</link>
      <guid>https://forem.com/clintt/aws-snow-family-875</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Overview&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The AWS Snow Family is a group of physical devices designed to help organizations transfer large amounts of data to and from AWS in environments where connectivity is limited, unreliable, or non-existent. It’s part of the AWS Data Migration services, allowing you to securely move data at petabyte scale or even deploy AWS capabilities to edge locations.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Components of AWS Snow Family&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The Snow Family includes three main products:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. AWS Snowcone:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; Smallest device in the Snow Family.&lt;br&gt;
&lt;strong&gt;Storage:&lt;/strong&gt; 8 TB of usable storage.&lt;br&gt;
&lt;strong&gt;Use Case:&lt;/strong&gt; Ideal for small-scale data transfer or edge computing in remote locations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lightweight and portable.&lt;/li&gt;
&lt;li&gt;Can run compute instances using AWS IoT Greengrass for edge computing tasks.&lt;/li&gt;
&lt;li&gt;Data transfer is encrypted, and the device has tamper-evident seals.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. AWS Snowball:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; More robust and versatile than Snowcone. It comes in two types; Snowball Edge Storage Optimized and Snowball Edge Compute Optimized.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Storage Optimized:&lt;/strong&gt; Up to 80 TB of usable storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compute Optimized:&lt;/strong&gt; 42 TB of storage with powerful compute capabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; Large-scale data migration (petabytes), edge computing for data processing, and temporary on-premises cloud deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rugged and secure devices designed for harsh environments.&lt;/li&gt;
&lt;li&gt;Can run EC2 instances and Lambda functions for edge computing.&lt;/li&gt;
&lt;li&gt;Supports S3-compatible data storage, and all data transfers are encrypted.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. AWS Snowmobile:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; A massive, truck-sized data migration solution.&lt;br&gt;
&lt;strong&gt;Storage:&lt;/strong&gt; Up to 100 PB (petabytes) of data.&lt;br&gt;
&lt;strong&gt;Use Case:&lt;/strong&gt; Designed for exabyte-scale data transfers, such as large-scale data center migrations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Physically transported in a shipping container.&lt;/li&gt;
&lt;li&gt;Secure, with military-grade security measures, including GPS tracking and 24/7 video surveillance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Key Features of the AWS Snow Family&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Edge Computing:&lt;/strong&gt; Both Snowcone and Snowball Edge allow you to run compute workloads at the edge, enabling local data processing before transferring it to the cloud.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Data Transfer &amp;amp; Migration:&lt;/strong&gt; Snow Family devices allow for secure, offline data transfers to AWS. Once filled with data, the devices are shipped back to AWS, where the data is loaded into S3 or other AWS services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Security:&lt;/strong&gt; All data is encrypted (AES-256 encryption) before it’s written to the device, ensuring secure transit. Devices are tamper-proof and come with tamper-evident seals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Scalability:&lt;/strong&gt; From small-scale (Snowcone) to massive (Snowmobile), the Snow Family offers solutions for different data transfer needs, from gigabytes to petabytes.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;When to Use AWS Snow Family&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Limited Bandwidth or Remote Locations:&lt;/strong&gt; If your organization operates in a location with poor or no internet connectivity, Snow devices are ideal for moving large datasets to AWS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large-Scale Data Transfer:&lt;/strong&gt; When transferring terabytes or petabytes of data over the internet is impractical due to costs or time constraints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edge Computing:&lt;/strong&gt; Run compute-intensive workloads at the edge using Snowball Edge or Snowcone when you need to process and analyze data locally before sending it to the cloud.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Use Cases &amp;amp; Industry Applications&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Disaster Recovery:&lt;/strong&gt; Quickly transfer large amounts of data to AWS for safe storage and recovery.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Media and Entertainment:&lt;/strong&gt; Move large video files, render workloads, or film footage from remote sites to the cloud.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Healthcare and Research:&lt;/strong&gt; Transfer large datasets like genomic data or medical imagery securely and efficiently to AWS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Center Migration:&lt;/strong&gt; Migrate large amounts of on-premise data to AWS as part of a cloud adoption strategy.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The AWS Snow Family provides a secure, scalable solution for organizations needing to move large volumes of data to AWS or run edge computing workloads in remote locations. With its flexibility and strong security features, it's an excellent choice for situations where network connectivity is limited or non-existent.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Elastic File Service</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Fri, 06 Sep 2024 20:42:12 +0000</pubDate>
      <link>https://forem.com/clintt/elastic-file-service-1o6g</link>
      <guid>https://forem.com/clintt/elastic-file-service-1o6g</guid>
      <description>&lt;p&gt;&lt;strong&gt;Amazon Elastic File System (Amazon EFS)&lt;/strong&gt; is a fully managed, serverless, and scalable file storage service that allows you to share file data across multiple Amazon EC2 instances and other AWS services. It’s ideal for workloads that require high throughput and concurrent access to file data. It's built for workloads that require shared access to a file system with high throughput and low latency.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Amazon Elastic File System (EFS) Setup Guide&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create an EFS File System&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Amazon EFS&lt;/strong&gt; service.&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;Create file system&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;Configure File System Settings:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; Optionally, provide a name for the file system to easily identify it.&lt;br&gt;
&lt;strong&gt;VPC:&lt;/strong&gt; Select the Virtual Private Cloud (VPC) where you want to create the EFS. The VPC should match the network where your EC2 instances are running.&lt;br&gt;
&lt;strong&gt;Availability and Durability:&lt;/strong&gt; You can opt for the default settings, which provide high availability across multiple availability zones.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Choose a Performance Mode:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;General Purpose:&lt;/strong&gt; Suitable for latency-sensitive use cases like web serving and content management.&lt;br&gt;
&lt;strong&gt;Max I/O:&lt;/strong&gt; Use this mode for workloads requiring higher throughput and can tolerate slightly higher latencies.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Select a Throughput Mode:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Bursting Throughput:&lt;/strong&gt; This is the default mode and works well for most applications. It automatically adjusts throughput based on file system activity.&lt;br&gt;
&lt;strong&gt;Provisioned Throughput:&lt;/strong&gt; Select this if you need a consistent level of throughput regardless of file size or I/O operations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Configure Network Access:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Mount Targets:&lt;/strong&gt; EFS requires mount targets in each availability zone (AZ) where you want to access the file system. Ensure that mount targets are created in the subnets where your EC2 instances are deployed.&lt;br&gt;
&lt;strong&gt;Security Groups:&lt;/strong&gt; Associate the security groups that allow inbound NFS traffic from your EC2 instances.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Review the settings you've configured, and then click &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8hdjbsdyyzcsnfir6rab.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8hdjbsdyyzcsnfir6rab.png" alt="Image description" width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd553t1cphrojhagz4c7i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd553t1cphrojhagz4c7i.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63qrvhv649tuxnby29ir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63qrvhv649tuxnby29ir.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Create a Security Group&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the left-hand menu, under Network &amp;amp; Security, click &lt;strong&gt;Security Groups&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Create a &lt;strong&gt;New Security Group.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Configure the Security Group:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; Provide a name (e.g., efs-nfs-ssh-sg).&lt;br&gt;
&lt;strong&gt;Description:&lt;/strong&gt; Describe the purpose (e.g., NFS access for EFS).&lt;br&gt;
&lt;strong&gt;VPC:&lt;/strong&gt; Select the appropriate VPC where EC2 instances and EFS are located.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5nv2wfs2ns1p2v24vd4y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5nv2wfs2ns1p2v24vd4y.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Add Inbound Rules for NFS and SSH&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add an SSH Rule:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Type:&lt;/strong&gt; &lt;code&gt;SSH&lt;/code&gt;.&lt;br&gt;
&lt;strong&gt;Port:&lt;/strong&gt; &lt;code&gt;22&lt;/code&gt;.&lt;br&gt;
&lt;strong&gt;Source:&lt;/strong&gt; Choose My IP or Anywhere (&lt;code&gt;0.0.0.0/0&lt;/code&gt;).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Add an NFS Rule:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Type:&lt;/strong&gt; &lt;code&gt;Custom NFS&lt;/code&gt;.&lt;br&gt;
&lt;strong&gt;Port:&lt;/strong&gt; &lt;code&gt;2049&lt;/code&gt;.&lt;br&gt;
&lt;strong&gt;Source:&lt;/strong&gt; Choose My IP or Anywhere (&lt;code&gt;0.0.0.0/0&lt;/code&gt;). For better security, it's recommended to restrict the source to the specific subnet(s) or security group(s) that need access.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fexh4qn1dkfpja5cyxd6e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fexh4qn1dkfpja5cyxd6e.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp5n5szf2bd76xn7vvno3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp5n5szf2bd76xn7vvno3.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Mount the EFS on EC2 Instances&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensure EC2 instances are in the same VPC and subnets as the EFS mount targets.&lt;/li&gt;
&lt;li&gt;Install NFS Utilities on EC2:&lt;/li&gt;
&lt;li&gt;Connect to your EC2 instance.&lt;/li&gt;
&lt;li&gt;Install NFS utilities using the appropriate package manager for your OS.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo su
yum install amazon-nfs-utils
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo38h621dzwcxjtg4amsh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo38h621dzwcxjtg4amsh.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F17hbp86stb0h58d75lfz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F17hbp86stb0h58d75lfz.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Then attach your EFS to both of your EC2 instances using the NFS client.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyblsetuptsedwezp3jfw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyblsetuptsedwezp3jfw.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Create and Access Files Across Instances&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a File on Instance 1. Navigate to the EFS mount directory:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd efs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create a file:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "Hello World" &amp;gt; helloworld.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsjksmj5zbs7d8eho1cvf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsjksmj5zbs7d8eho1cvf.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access the File on Instance 2. Navigate to the same EFS mount directory:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd efs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verify the file:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -l
cat helloworld.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqmypv07wwolhcmob6ti2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqmypv07wwolhcmob6ti2.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The contents should match what was written on Instance 1.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon EFS offers scalable, reliable, and fully managed shared file storage for EC2 and other AWS services. Its ease of use, high availability, and flexible performance options make it ideal for a variety of workloads, from web hosting to data analytics. With built-in security and seamless AWS integration, EFS is a powerful solution for simplifying cloud file storage management.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>efs</category>
      <category>cloudcomputing</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Route53 With Application Loadbalancer</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Wed, 04 Sep 2024 20:34:55 +0000</pubDate>
      <link>https://forem.com/clintt/route53-with-applicationloadbalancer-5be3</link>
      <guid>https://forem.com/clintt/route53-with-applicationloadbalancer-5be3</guid>
      <description>&lt;p&gt;Amazon Route 53 is a scalable and highly available Domain Name System (DNS) web service that allows you to manage and route traffic to your resources in a reliable and cost-effective way.  Amazon Route 53, combined with the powerful Application Load Balancer (ALB), provides a robust solution to distribute traffic across EC2 instances in multiple availability zones.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1: Set Up the Application Load Balancer (ALB)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Launch Two EC2 Instances&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the AWS Management Console and navigate to the EC2 dashboard.&lt;/li&gt;
&lt;li&gt;Launch two EC2 instances in different availability zones (e.g., &lt;code&gt;us-east-1a&lt;/code&gt; and &lt;code&gt;us-east-1b&lt;/code&gt;) with the same AMI and security group.&lt;/li&gt;
&lt;li&gt;Ensure that both instances have HTTP and SSH ports enabled in their security group.&lt;/li&gt;
&lt;li&gt;Add this bash script file for server 1.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
yum update -y
yum upgrade -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
echo "&amp;lt;h1&amp;gt;My Webserver 1&amp;lt;/h1&amp;gt;" &amp;gt; /var/www/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Add this bash script file for server 2.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
yum update -y
yum upgrade -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
echo "&amp;lt;h1&amp;gt;My Webserver 2&amp;lt;/h1&amp;gt;" &amp;gt; /var/www/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15ev2iwo8b0na5g24538.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15ev2iwo8b0na5g24538.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faiv5n8uggsgkuey50d2b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faiv5n8uggsgkuey50d2b.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ele4rt8ge1t1f965nye.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ele4rt8ge1t1f965nye.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create a Target Group&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to Target Groups in the EC2 dashboard.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create target group&lt;/strong&gt; and select the &lt;strong&gt;Instances type&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select your &lt;strong&gt;VPC&lt;/strong&gt; and include both EC2 instances in the target group.&lt;/li&gt;
&lt;li&gt;Ensure health checks are enabled for your instances.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh46vz4ou34993izf6s6m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh46vz4ou34993izf6s6m.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsijatvrbdoomrggjkh2a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsijatvrbdoomrggjkh2a.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczevst1pukoohub7rtyv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczevst1pukoohub7rtyv.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi8oisioycji07z95gz7i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi8oisioycji07z95gz7i.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwd5by7kigeaxvyh4a2az.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwd5by7kigeaxvyh4a2az.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsijn618f3cawjrnd5g1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsijn618f3cawjrnd5g1u.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Create the Application Load Balancer&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to Load Balancers in the EC2 dashboard.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create Load Balancer&lt;/strong&gt; and select &lt;strong&gt;Application Load Balancer&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the Network mapping section, select your VPC and choose the availability zones where your EC2 instances are running.&lt;/li&gt;
&lt;li&gt;Assign the same security group that allows HTTP traffic.&lt;/li&gt;
&lt;li&gt;Under Listeners and Routing, select the target group you created earlier.&lt;/li&gt;
&lt;li&gt;Click Create &lt;strong&gt;Load Balancer&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq1ktgwap2upts2a6zn1s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq1ktgwap2upts2a6zn1s.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqx1nq3hcqmstuthd7w6r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqx1nq3hcqmstuthd7w6r.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgluv7yu9d2w7fcml9rmt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgluv7yu9d2w7fcml9rmt.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2tdjivs8jpno9wukmzwd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2tdjivs8jpno9wukmzwd.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Check the Status of the Load Balancer&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wait until the status of your Load Balancer changes from "&lt;strong&gt;Provisioning&lt;/strong&gt;" to "&lt;strong&gt;Active&lt;/strong&gt;."&lt;/li&gt;
&lt;li&gt;Check the target group to ensure both EC2 instances are showing as &lt;strong&gt;healthy&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fffgudzi3ykckwaoami89.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fffgudzi3ykckwaoami89.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 2: Use AWS Provided DNS Name&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Get the DNS Name of the Application Load Balancer&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After the Load Balancer is created, go to the Load Balancers section in the EC2 dashboard.&lt;/li&gt;
&lt;li&gt;Select your ALB, and you’ll see the DNS name of the Load Balancer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Test the Load Balancer&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a web browser and paste the ALB DNS name in the address bar.&lt;/li&gt;
&lt;li&gt;You should be able to see the webpage served by one of your EC2 instances.&lt;/li&gt;
&lt;li&gt;Refresh the browser a few times, and the request should switch between both EC2 instances.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnv1h1c957poe5t9jqmka.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnv1h1c957poe5t9jqmka.png" alt="Image description" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4c9gvovg7x702urtcaou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4c9gvovg7x702urtcaou.png" alt="Image description" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 3: Route 53 Custom Domain Integration&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Create a Hosted Zone in Route 53&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the AWS Management Console, navigate to &lt;strong&gt;Route 53&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Hosted Zones&lt;/strong&gt; and create a new hosted zone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv6v9nuso2d937xe44bg7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv6v9nuso2d937xe44bg7.png" alt="Image description" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F466v8oi3uhm2mn0onb5x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F466v8oi3uhm2mn0onb5x.png" alt="Image description" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzhj24301zndgzh4n4ya3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzhj24301zndgzh4n4ya3.png" alt="Image description" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create a CNAME Record&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;strong&gt;hosted zone&lt;/strong&gt; you created.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create Record&lt;/strong&gt; and choose CNAME as the record type.&lt;/li&gt;
&lt;li&gt;In Record name - &lt;code&gt;www&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Record type - &lt;code&gt;CNAME&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Value - &lt;code&gt;DNS&lt;/code&gt; of our application load balancer we created in above steps.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create records&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnwbaav3qr51mtvbv17ka.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnwbaav3qr51mtvbv17ka.png" alt="Image description" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now we need to copy the NS record type → all 4 Value/Route traffic and paste it in the name servers of our purchased domain.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0f45alkdnre3ue8ai7ek.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0f45alkdnre3ue8ai7ek.png" alt="Image description" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In web browser search your domain name and the request will be served from both the instances.
You can test this setup using the DNS name provided by the ALB, as you won't be able to route traffic using the placeholder domain without proper registration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;By successfully integrating Amazon Route 53 with an Application Load Balancer, you've implemented a highly available and fault-tolerant architecture that optimizes traffic distribution across multiple EC2 instances. This setup not only enhances application performance but also ensures that requests are dynamically routed to healthy instances in multiple availability zones.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Static Website Hosting Using S3 Bucket</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Tue, 03 Sep 2024 20:33:37 +0000</pubDate>
      <link>https://forem.com/clintt/static-website-hosting-using-s3bucket-2ee</link>
      <guid>https://forem.com/clintt/static-website-hosting-using-s3bucket-2ee</guid>
      <description>&lt;p&gt;Amazon S3 (Simple Storage Service) offers a cost-effective and scalable solution for hosting static websites that consist solely of HTML, CSS, and JavaScript files. Amazon S3 offers a robust infrastructure that allows you to store and serve your website's content to users globally, without the need to manage servers. Below is a hand-on steps for achieving this.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Steps&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Create an S3 Bucket&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the S3 service in the AWS Management Console.&lt;/li&gt;
&lt;li&gt;Click on “&lt;strong&gt;Create bucket&lt;/strong&gt;” and provide a unique bucket name (e.g., &lt;code&gt;my-website-bucket-yourname&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Choose a region and leave other settings as default.&lt;/li&gt;
&lt;li&gt;Click “&lt;strong&gt;Create bucket&lt;/strong&gt;”.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31505az6it9npkix81w2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31505az6it9npkix81w2.png" alt="Image description" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3v3nteyp872pegmxx40.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3v3nteyp872pegmxx40.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6as8ao1xrh80lut1wn2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6as8ao1xrh80lut1wn2.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx4tmamnplu06b7yw5wf3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx4tmamnplu06b7yw5wf3.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Upload Website Content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the newly created bucket.&lt;/li&gt;
&lt;li&gt;Click “&lt;strong&gt;Upload&lt;/strong&gt;” and add your website files (HTML, CSS, JS).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgx0mt713iryh4djpnpm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgx0mt713iryh4djpnpm.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fef0trx5t8wcyv787h1vp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fef0trx5t8wcyv787h1vp.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Set permissions to make your website files publicly accessible.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the AWS Management Console and open the S3 service.&lt;/li&gt;
&lt;li&gt;Click on the bucket name that contains your website files.&lt;/li&gt;
&lt;li&gt;In the bucket, go to the &lt;strong&gt;Permissions tab&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scroll down to the Bucket Policy section and click on &lt;strong&gt;Edit&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add the following bucket policy to allow public access to all objects in the bucket:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::your-bucket-name/*"
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Replace your-bucket-name with the name of your bucket.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Save changes&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsegr2shlaysh48vxnkql.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsegr2shlaysh48vxnkql.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4f6u8530iruqi0hvdxdp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4f6u8530iruqi0hvdxdp.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Enable Static Website Hosting&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the bucket settings, select the “&lt;strong&gt;Properties&lt;/strong&gt;” tab.&lt;/li&gt;
&lt;li&gt;Click “&lt;strong&gt;Static website hosting&lt;/strong&gt;” and enable it.&lt;/li&gt;
&lt;li&gt;Specify the index document (e.g., &lt;code&gt;index.html&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Save the changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0uf7ng53jgxvs5pq4nsf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0uf7ng53jgxvs5pq4nsf.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvpfwepiq847yxx2cyac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvpfwepiq847yxx2cyac.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Access Your Website Using the S3 Endpoint&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once you enable static website hosting, AWS will provide an S3 website endpoint. This endpoint typically looks like:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://my-website-bucket.s3-website-region.amazonaws.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Replace my-website-bucket with your &lt;strong&gt;bucket name&lt;/strong&gt; and region with the region code (e.g., &lt;strong&gt;us-east-1&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;You can now access your static website by navigating to this endpoint in your web browser.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa2lz74bquggo8xnc6a9v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa2lz74bquggo8xnc6a9v.png" alt="Image description" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;By following these steps, you've successfully set up a static website hosted on Amazon S3, leveraging AWS's scalable and reliable infrastructure without the need to manage servers. Your website is now globally accessible via the S3 endpoint, allowing you to deliver content efficiently to users around the world. This setup not only simplifies the process of hosting a static website but also provides a cost-effective solution with the flexibility to scale as your website's traffic grows.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloudcomputing</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Network load Balancer</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Mon, 02 Sep 2024 20:51:45 +0000</pubDate>
      <link>https://forem.com/clintt/network-load-balancer-2gfb</link>
      <guid>https://forem.com/clintt/network-load-balancer-2gfb</guid>
      <description>&lt;p&gt;A Network Load Balancer (NLB) is a type of load balancer provided by AWS that operates at the Transport Layer (Layer 4) of the OSI model. It is designed to handle high volumes of traffic and distribute it efficiently across multiple targets, such as EC2 instances, containers, or IP addresses.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Aim&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Provide step-by-step instructions for creating a launch template, setting up an Auto Scaling Group, configuring the NLB, and verifying the setup to ensure that the traffic is balanced effectively.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Objective&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create and configure a launch template that automates the setup of EC2 instances.&lt;/li&gt;
&lt;li&gt;Establish an ASG that dynamically adjusts the number of instances based on load requirements.&lt;/li&gt;
&lt;li&gt;Set up a NLB and associate it with an ASG to distribute incoming traffic across multiple instances.&lt;/li&gt;
&lt;li&gt;Verify the proper configuration of the NLB and Auto Scaling Group, ensuring that traffic is routed efficiently and that the system scales as needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Steps&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Create a Launch Template&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the navigation pane, choose "&lt;strong&gt;Launch Templates&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Choose "&lt;strong&gt;Create launch template&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Enter a name and description for your launch template (e.g., &lt;code&gt;MyLaunchTemplate&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;Choose an AMI (e.g., Amazon Linux 2 AMI).&lt;/li&gt;
&lt;li&gt;Select an instance type (e.g., &lt;code&gt;t2.micro&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;In the Advanced details section, under &lt;code&gt;User data&lt;/code&gt; , paste your Bash script:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
yum update -y
yum upgrade -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
echo "this is my $(hostname)" &amp;gt; /var/www/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Choose a key pair and configure other settings like security groups.&lt;/li&gt;
&lt;li&gt;Choose "&lt;strong&gt;Create launch template&lt;/strong&gt;".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxf4gpmn75xs82mb9vrxj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxf4gpmn75xs82mb9vrxj.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb18egrsyqt61zfk8zzw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb18egrsyqt61zfk8zzw.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0l4offohqzrgmnvyrtlj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0l4offohqzrgmnvyrtlj.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftgpjk2qyoo32iv87hdna.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftgpjk2qyoo32iv87hdna.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create an Auto Scaling Group&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the navigation pane, choose "&lt;strong&gt;Auto Scaling Groups&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Choose "&lt;strong&gt;Create Auto Scaling group&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Enter a name for your auto-scaling group (e.g., &lt;code&gt;MyAutoScalingGroup&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;Select the launch template created in step 1.&lt;/li&gt;
&lt;li&gt;Choose "&lt;strong&gt;Next&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Choose the VPC and subnets where you want your instances to run.&lt;/li&gt;
&lt;li&gt;Specify the group size (minimum capacity: 2, desired capacity: 2, maximum capacity: 5).&lt;/li&gt;
&lt;li&gt;Configure scaling policies if needed, then choose "&lt;strong&gt;Next&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Configure notifications, tags, and other settings as needed.&lt;/li&gt;
&lt;li&gt;Review and create the auto-scaling group.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6coh38pas9v2eg3xsgm1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6coh38pas9v2eg3xsgm1.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5sra85bnrzy5knkpfj2p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5sra85bnrzy5knkpfj2p.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dhof699ezodnr7lzjz6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dhof699ezodnr7lzjz6.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fipigsq3b8npagcojl63p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fipigsq3b8npagcojl63p.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Create a Network Load Balancer and Target Group&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the navigation pane, choose "&lt;strong&gt;Load Balancers&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Choose "Create Load Balancer".&lt;/li&gt;
&lt;li&gt;Select "Network Load Balancer" and choose "Create".&lt;/li&gt;
&lt;li&gt;Enter a name for your load balancer (e.g., &lt;code&gt;MyNetworkLoadBalancer&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;Select the scheme (e.g., &lt;code&gt;internet-facing&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;Choose the VPC and subnets.&lt;/li&gt;
&lt;li&gt;Configure the listeners (protocol: TCP, port: 80).&lt;/li&gt;
&lt;li&gt;Choose "&lt;strong&gt;Next&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Under "&lt;strong&gt;Configure routing&lt;/strong&gt;", choose "&lt;strong&gt;Create a target group&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Enter a name for your target group (e.g., &lt;code&gt;MyTargetGroup&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;Select the target type (e.g., &lt;code&gt;instance&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;Configure the health checks (protocol: TCP, port: 80).&lt;/li&gt;
&lt;li&gt;Choose "&lt;strong&gt;Next&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Register targets if needed, or choose "&lt;strong&gt;Next&lt;/strong&gt;" if you want the auto-scaling group to manage targets.&lt;/li&gt;
&lt;li&gt;Review and create the target group.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqqxisvn00owrb5fc8t7w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqqxisvn00owrb5fc8t7w.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhen7oymrmtryws5b9sg5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhen7oymrmtryws5b9sg5.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frh3gjgd5khuna7y0wlvr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frh3gjgd5khuna7y0wlvr.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9uq5ii3pvi5jaetwuga4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9uq5ii3pvi5jaetwuga4.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fens7r75sjkfcvd96ni2a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fens7r75sjkfcvd96ni2a.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Attach Target Group to Auto Scaling Group&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the navigation pane, choose "Auto Scaling Groups".&lt;/li&gt;
&lt;li&gt;Select your auto-scaling group ( &lt;code&gt;MyASG&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;Choose the "&lt;strong&gt;Details&lt;/strong&gt;" tab, then "&lt;strong&gt;Edit&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Under "&lt;strong&gt;Load balancing&lt;/strong&gt;", select "&lt;strong&gt;Attach to a new load balancer&lt;/strong&gt;".&lt;/li&gt;
&lt;li&gt;Choose "&lt;strong&gt;Attach to an existing target group&lt;/strong&gt;" and select your target group ( &lt;code&gt;MyTargetGroup&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;Save the changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffa3snwz42hy1yvt7qdc6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffa3snwz42hy1yvt7qdc6.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Verify Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensure the instances are launched in the desired subnets and are healthy in the target group.&lt;/li&gt;
&lt;li&gt;Test the network load balancer's DNS name to verify it distributes traffic to the instances.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdoezgcepzqj572do58rg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdoezgcepzqj572do58rg.png" alt="Image description" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;These steps helps to successfully implement a Network Load Balancer in AWS, effectively distributing traffic across multiple EC2 instances managed by an Auto Scaling Group. This setup not only enhances the availability and reliability of applications but also ensures that the system can scale to meet varying levels of demand.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>nlb</category>
      <category>cloud</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Application Load Balancer</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Sat, 31 Aug 2024 20:26:08 +0000</pubDate>
      <link>https://forem.com/clintt/application-load-balancer-27jh</link>
      <guid>https://forem.com/clintt/application-load-balancer-27jh</guid>
      <description>&lt;p&gt;An Application Load Balancer (ALB) is one of the types of load balancers provided by Amazon Web Services (AWS) within the Elastic Load Balancing (ELB) service. ALB is designed to handle and distribute incoming application traffic across multiple targets, such as EC2 instances, containers, and IP addresses, based on specified rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Aim&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To configure an Application Load Balancer (ALB) in Amazon Web Services (AWS) that distributes traffic to EC2 instances across two subnets in different AZ within the default Virtual Private Cloud (VPC). Additionally, configure the EC2 instances with an HTTP web server.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Objective&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Launch two EC2 instances, each in a different subnet within the the default VPC.&lt;/li&gt;
&lt;li&gt;Set up an Application Load Balancer (ALB) to distribute incoming traffic across the EC2 instances.&lt;/li&gt;
&lt;li&gt;Configure the EC2 instances as Linux servers with an HTTP web server.&lt;/li&gt;
&lt;li&gt;Ensure the setup allows for high availability and fault tolerance by leveraging multiple Availability Zones.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Steps&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Launch two EC2 Instances&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the EC2 Dashboard in the AWS Management Console.&lt;/li&gt;
&lt;li&gt;Click "Launch Instance."&lt;/li&gt;
&lt;li&gt;Select an Amazon Machine Image (AMI) (e.g., Amazon Linux 2).&lt;/li&gt;
&lt;li&gt;Choose an instance type.&lt;/li&gt;
&lt;li&gt;Under "Network," select the default VPC.&lt;/li&gt;
&lt;li&gt;Choose a subnet in an Availability Zone (e.g., us-east-1a).&lt;/li&gt;
&lt;li&gt;Under "Advanced Details &amp;gt; USER DATA
&lt;strong&gt;SCRIPT:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
yum update -y
yum upgrade -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
echo "&amp;lt;h1&amp;gt;Instance A is running&amp;lt;/h1&amp;gt;" &amp;gt; /var/www/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Second Ec2 Instance
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
yum update -y
yum upgrade -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
echo "&amp;lt;h1&amp;gt;Instance B is running&amp;lt;/h1&amp;gt;" &amp;gt; /var/www/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Configure the security group to allow HTTP (port 80) and SSH (port 22) traffic.&lt;/li&gt;
&lt;li&gt;Launch the instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ag90xo1ujd1xxlhlvu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ag90xo1ujd1xxlhlvu7.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbxjv3vn61q3pumqjpcpk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbxjv3vn61q3pumqjpcpk.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1s0ih3l0pbnta554gvho.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1s0ih3l0pbnta554gvho.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Create an Application Load Balancer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Create ALB:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the EC2 Dashboard.&lt;/li&gt;
&lt;li&gt;Under "Load Balancing," click "Load Balancers."&lt;/li&gt;
&lt;li&gt;Click "Create Load Balancer" and choose "Application Load Balancer."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Configure Security Groups:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create or select an existing security group that allows inbound HTTP/HTTPS traffic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Configure Routing:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a target group.&lt;/li&gt;
&lt;li&gt;Choose "Instances" as the target type.&lt;/li&gt;
&lt;li&gt;Configure the health checks for the target group.&lt;/li&gt;
&lt;li&gt;Register your EC2 instances with this target group.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Review and Create:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Review your configuration and create the load balancer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ux3y7acg6dmofn44cw1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ux3y7acg6dmofn44cw1.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqs6d2czeggaw0qvoi53w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqs6d2czeggaw0qvoi53w.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsmlaw9n94025wq8886b8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsmlaw9n94025wq8886b8.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6y8wokeeya72mfzlhtaq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6y8wokeeya72mfzlhtaq.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5s4mkwwd21ov0eqa8os.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5s4mkwwd21ov0eqa8os.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fupq0wdjz9ie75pwcajsd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fupq0wdjz9ie75pwcajsd.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuymynmcy4lmqcfbab98t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuymynmcy4lmqcfbab98t.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvso0rar1pdd4f3daseyl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvso0rar1pdd4f3daseyl.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyg58fa4vwlm3rsis44us.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyg58fa4vwlm3rsis44us.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41zjmgzuj5j1qa4max7j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41zjmgzuj5j1qa4max7j.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb8i1jzs1wxe94f55v3lb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb8i1jzs1wxe94f55v3lb.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Test the Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test ALB:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Note the DNS name of the ALB.&lt;/li&gt;
&lt;li&gt;Access it via a web browser to ensure it distributes traffic to your EC2&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Instance A&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4k4b98wd0grotv6ij70n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4k4b98wd0grotv6ij70n.png" alt="Image description" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instance B&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkcg7611zyx9dtzwxtvun.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkcg7611zyx9dtzwxtvun.png" alt="Image description" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;By completing these steps, you have successfully configured an Application Load Balancer (ALB) in AWS within the default VPC and subnets. The ALB now efficiently distributes incoming traffic across EC2 instances in multiple Availability Zones, ensuring high availability and fault tolerance&lt;/p&gt;

</description>
      <category>aws</category>
      <category>alb</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>NAT Gateway Implementation</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Thu, 29 Aug 2024 19:54:02 +0000</pubDate>
      <link>https://forem.com/clintt/nat-gateway-implementation-2c6f</link>
      <guid>https://forem.com/clintt/nat-gateway-implementation-2c6f</guid>
      <description>&lt;p&gt;A &lt;strong&gt;NAT Gateway&lt;/strong&gt; is a key component in AWS networking, that allows instances in a private subnet to connect to the internet or other AWS services while preventing inbound traffic from the internet. Below are steps on how to implement it;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Aim&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To provide a comprehensive guide on implementing a NAT Gateway in AWS, detailing the necessary steps to set up a secure and efficient networking environment. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Objectives&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To demonstrate the configuration and attachment of an Internet Gateway to facilitate internet connectivity for the public subnet.&lt;/li&gt;
&lt;li&gt;To provide step-by-step instructions for creating and configuring a NAT Gateway.&lt;/li&gt;
&lt;li&gt;To verify the configuration by launching instances in both public and private subnets, confirming their respective connectivity requirements are met.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Steps&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Create a VPC&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to the AWS Management Console.&lt;/li&gt;
&lt;li&gt;Navigate to the VPC Dashboard.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Your VPCs&lt;/strong&gt; in the left-hand menu.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create VPC&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in the following details: &lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;MyVpc&lt;/code&gt; &lt;strong&gt;IPv4 CIDR block:&lt;/strong&gt; &lt;code&gt;10.0.0.0/16&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create VPC&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F35sbr768zbhf1u9j56bh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F35sbr768zbhf1u9j56bh.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create Subnets&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Public Subnet&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the VPC Dashboard, click on &lt;strong&gt;Subnets&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create subnet&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter the following details: &lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;PublicSubnet&lt;/code&gt;, &lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;, &lt;strong&gt;Availability Zone:&lt;/strong&gt; Choose one (e.g., &lt;code&gt;af-south-1a&lt;/code&gt; ), &lt;strong&gt;IPv4 CIDR block:&lt;/strong&gt; &lt;code&gt;10.0.1.0/24&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create subnet&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkngbjymzcy25eorsl54m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkngbjymzcy25eorsl54m.png" alt="Image description" width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Private Subnet&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the VPC Dashboard, click on &lt;strong&gt;Subnets&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create subnet&lt;/strong&gt; again.&lt;/li&gt;
&lt;li&gt;Fill in the following details: &lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;PrivateSubnet&lt;/code&gt; &lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt; &lt;strong&gt;Availability Zone:&lt;/strong&gt; Choose one (e.g., &lt;code&gt;af-south-1b&lt;/code&gt; ) &lt;strong&gt;IPv4 CIDR block:&lt;/strong&gt; &lt;code&gt;10.0.2.0/24&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create subnet&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F47e0pav852rar7o2euut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F47e0pav852rar7o2euut.png" alt="Image description" width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Create and Attach an Internet Gateway&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the &lt;strong&gt;Internet Gateways&lt;/strong&gt; section in the VPC Dashboard.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create internet gateway&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in the following details:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;MyInternetGateway&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create internet gateway&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the newly created Internet Gateway and click &lt;strong&gt;Actions &amp;gt; Attach to VPC&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select MyVpc and click &lt;strong&gt;Attach internet gateway&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5xcp1mgranv5fi2qzkf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5xcp1mgranv5fi2qzkf.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1hym4viun152n67og1js.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1hym4viun152n67og1js.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Create a NAT Gateway&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the &lt;strong&gt;NAT Gateways&lt;/strong&gt; section in the VPC Dashboard.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create NAT gateway&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in the following details:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;MyNatGateway&lt;/code&gt;
&lt;strong&gt;Subnet:&lt;/strong&gt; Select &lt;code&gt;PublicSubnet&lt;/code&gt;
&lt;strong&gt;Elastic IP allocation ID:&lt;/strong&gt; Click on &lt;strong&gt;Allocate Elastic IP&lt;/strong&gt; and then &lt;strong&gt;Allocate&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create a NAT Gateway&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq1pdrbedc79unrduhoub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq1pdrbedc79unrduhoub.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Create Route Tables&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the &lt;strong&gt;Route Tables&lt;/strong&gt; section in the VPC Dashboard.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create route table&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in the details for the public route table:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;PublicRouteTable&lt;/code&gt;
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create route table&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the newly created route table &lt;code&gt;PublicRouteTable&lt;/code&gt; and click on the &lt;strong&gt;Routes&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Edit routes &amp;gt; Add route&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set the &lt;strong&gt;Destination&lt;/strong&gt; to &lt;code&gt;0.0.0.0/0&lt;/code&gt; and &lt;strong&gt;Target&lt;/strong&gt; to the Internet Gateway ( &lt;code&gt;MyInternetGateway&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save routes&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvzo470vc8rv60gvm6x28.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvzo470vc8rv60gvm6x28.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwkn3acp6n61ofvxat3c3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwkn3acp6n61ofvxat3c3.png" alt="Image description" width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go back to &lt;strong&gt;Route Tables&lt;/strong&gt; and create another route table for the private subnet:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;PrivateRouteTable&lt;/code&gt;
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create route table&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the newly created route table &lt;code&gt;PrivateRouteTable&lt;/code&gt; and click on the &lt;strong&gt;Routes&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Edit routes &amp;gt; Add route&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set the &lt;strong&gt;Destination&lt;/strong&gt; to &lt;code&gt;0.0.0.0/0&lt;/code&gt; and &lt;strong&gt;Target&lt;/strong&gt; to the NAT Gateway ( &lt;code&gt;MyInternetGateway&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save routes&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjs3slnrgfnb8dg1oc8g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjs3slnrgfnb8dg1oc8g.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frba8digvirz1jwoupvv8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frba8digvirz1jwoupvv8.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Associate Route Tables with Subnets&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select the &lt;strong&gt;PublicRouteTable&lt;/strong&gt; route table.&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;Subnet associations&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Edit subnet associations&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;PrivateRouteTable&lt;/strong&gt; and click &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;PrivateRouteTable&lt;/strong&gt; route table.&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;Subnet associations&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Edit subnet associations&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;PrivateRouteTable&lt;/strong&gt; and click &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcv0pdmaq47sbj9c6v3xe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcv0pdmaq47sbj9c6v3xe.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzle4c54m7o8tg8w6y9l7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzle4c54m7o8tg8w6y9l7.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Launch Instances&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the &lt;strong&gt;EC2 Dashboard&lt;/strong&gt; in the AWS Management Console.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Launch Instance&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in the following details:
&lt;strong&gt;Name:&lt;/strong&gt; public-instance
&lt;strong&gt;AMI:&lt;/strong&gt; Select an AMI, e.g., Amazon Linux 2
&lt;strong&gt;Instance type:&lt;/strong&gt; t2.micro (or any other type you prefer)
&lt;strong&gt;Key pair:&lt;/strong&gt; Create a new key pair or select an existing one&lt;/li&gt;
&lt;li&gt;Network settings:
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;strong&gt;Subnet:&lt;/strong&gt; Select &lt;code&gt;PublicSubnet&lt;/code&gt;
&lt;strong&gt;Auto-assign Public IP:&lt;/strong&gt; Enable&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Launch instance&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Repeat the steps to launch another instance in the private subnet:
&lt;strong&gt;Name:&lt;/strong&gt; private-instance
&lt;strong&gt;AMI:&lt;/strong&gt; Select an AMI, e.g., Amazon Linux 2
&lt;strong&gt;Instance type:&lt;/strong&gt; t2.micro (or any other type you prefer)
&lt;strong&gt;Key pair:&lt;/strong&gt; Create a new key pair or select an existing one
Network settings:
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;strong&gt;Subnet:&lt;/strong&gt; Select &lt;code&gt;PrivateSubnet&lt;/code&gt;
&lt;strong&gt;Auto-assign Public IP:&lt;/strong&gt; Disable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Verify the Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public Instance:&lt;/strong&gt; Should have internet access directly.&lt;br&gt;
&lt;strong&gt;Private Instance:&lt;/strong&gt; Should have internet access through the NAT Gateway.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A NAT Gateway is essential for allowing instances in a private subnet to securely access the internet or other AWS services while preventing inbound traffic. This setup ensures the privacy of your internal resources and effective management of outbound connections, enhancing the security and functionality of your AWS environment.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Security Groups &amp; Network ACLs</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Wed, 28 Aug 2024 16:02:52 +0000</pubDate>
      <link>https://forem.com/clintt/security-groups-network-acls-k29</link>
      <guid>https://forem.com/clintt/security-groups-network-acls-k29</guid>
      <description>&lt;p&gt;&lt;strong&gt;Security groups&lt;/strong&gt; and &lt;strong&gt;Network ACLs&lt;/strong&gt; are similar in that they allow you to control access to AWS resources within your VPC. Howerver, SGs allow you to control inbound and outbound traffic at the instance level, while NACLs offer similar capabilities at the VPC subnet level.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Aim&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To provide a comprehensive, step-by-step guide understanding on how to configure and manage key components such as VPCs, subnets, internet gateways, route tables, security groups, and Network ACLs, ensuring a secure and scalable environment for deploying AWS resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Objective&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Demonstrate the creation and configuration of a VPC and its associated components, including public and private subnets.&lt;/li&gt;
&lt;li&gt;Illustrate the setup and association of Security Groups and Network ACLs to control inbound and outbound traffic at both the instance and subnet levels.&lt;/li&gt;
&lt;li&gt;Guide readers through the process of launching and securely accessing an EC2 instance within the configured VPC environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Steps&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Create a VPC&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to the AWS Management Console.&lt;/li&gt;
&lt;li&gt;Navigate to the VPC Dashboard.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Your VPCs&lt;/strong&gt; in the left-hand menu.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create VPC.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Enter the following details:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;MyVpc&lt;/code&gt;
&lt;strong&gt;IPv4 CIDR block:&lt;/strong&gt; &lt;code&gt;10.0.0.0/16&lt;/code&gt;
&lt;strong&gt;IPv6 CIDR block:&lt;/strong&gt; No IPv6 CIDR Block
&lt;strong&gt;Tenancy:&lt;/strong&gt; Default&lt;/li&gt;
&lt;li&gt;Click on Create VPC.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsx6s4onozms60690g1lt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsx6s4onozms60690g1lt.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create Subnets&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Create Public Subnet&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In the VPC Dashboard, click on &lt;strong&gt;Subnets&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create subnet&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter the following details:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;PublicSubnet&lt;/code&gt;,
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;,
&lt;strong&gt;Availability Zone:&lt;/strong&gt; Choose one (e.g., &lt;code&gt;af-south-1a&lt;/code&gt; ),
&lt;strong&gt;IPv4 CIDR block:&lt;/strong&gt; &lt;code&gt;10.0.1.0/24&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create subnet&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzco6716ks79sc1aonxkj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzco6716ks79sc1aonxkj.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Private Subnet&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the VPC Dashboard, click on &lt;strong&gt;Subnets&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create subnet&lt;/strong&gt; again.&lt;/li&gt;
&lt;li&gt;Enter the following details:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;PrivateSubnet&lt;/code&gt;
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;strong&gt;Availability Zone:&lt;/strong&gt; Choose one (e.g., &lt;code&gt;af-south-1b&lt;/code&gt; )
&lt;strong&gt;IPv4 CIDR block:&lt;/strong&gt; &lt;code&gt;10.0.2.0/24&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create subnet&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2h2wfxicsbxzwfh6rsil.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2h2wfxicsbxzwfh6rsil.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Create an Internet Gateway&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on &lt;strong&gt;Create internet gateway&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter the following details:&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;MyInternetGateway&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create internet gateway&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bgr3hfomssd5eyzqbva.png" alt="Image description" width="800" height="355"&gt;
&lt;/li&gt;
&lt;li&gt;Select the newly created internet gateway, then click on*&lt;em&gt;Actions&lt;/em&gt;* and select &lt;strong&gt;Attach to VPC&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Choose &lt;code&gt;MyVpc&lt;/code&gt; and click on &lt;strong&gt;Attach internet gateway&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftv35fykn015alouvlrzy.png" alt="Image description" width="800" height="355"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;4. Create Route Tables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Public Route Table&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the VPC Dashboard, click on &lt;strong&gt;Route Tables&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create route table&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter the following details:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;PublicRouteTable&lt;/code&gt;
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create route table&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwhbty3uy0awiiehsqkk.png" alt="Image description" width="800" height="355"&gt;
&lt;/li&gt;
&lt;li&gt;Select the newly created route table, click on &lt;strong&gt;Routes,&lt;/strong&gt; then click on &lt;strong&gt;Edit routes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add the following route:
&lt;strong&gt;Destination:&lt;/strong&gt; &lt;code&gt;0.0.0.0/0&lt;/code&gt;
&lt;strong&gt;Target:&lt;/strong&gt; Select &lt;code&gt;Internet Gateway&lt;/code&gt; and then select &lt;code&gt;MyInternetGateway&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Save routes&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3m06ta4icjhpon8ehtsh.png" alt="Image description" width="800" height="355"&gt;
&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;Subnet associations&lt;/strong&gt; tab, then click on &lt;strong&gt;Edit subnet associations&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;PublicSubnet&lt;/code&gt; and click on &lt;strong&gt;Save associations&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyh3pxrxs1jr3hmdlqcr9.png" alt="Image description" width="800" height="355"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Create Private Route Table&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on &lt;strong&gt;Create route table&lt;/strong&gt; again.&lt;/li&gt;
&lt;li&gt;Enter the following details:
&lt;strong&gt;Name tag&lt;/strong&gt;: &lt;code&gt;PrivateRouteTable&lt;/code&gt;
&lt;strong&gt;VPC&lt;/strong&gt;: Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create route table&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhg0psyje4rehack6e0c7.png" alt="Image description" width="800" height="355"&gt;
&lt;/li&gt;
&lt;li&gt;No need to add routes for the private route table at this point unless you have a specific setup (e.g., NAT Gateway for internet access)&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;Subnet associations&lt;/strong&gt; tab, then click on &lt;strong&gt;Edit subnet associations&lt;/strong&gt;.
Select &lt;code&gt;PrivateSubnet&lt;/code&gt; and click on &lt;strong&gt;Save associations&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Focln9npd5usbj0o5yz2k.png" alt="Image description" width="800" height="355"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;5. Create Security Groups&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Public Security Group&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the EC2 Dashboard, click on &lt;strong&gt;Security Groups&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create security group&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter the following details:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;PublicSG&lt;/code&gt;
&lt;strong&gt;Description:&lt;/strong&gt; Security group for public instances
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add Inbound Rules:
&lt;strong&gt;Type:&lt;/strong&gt; &lt;code&gt;SSH&lt;/code&gt;
&lt;strong&gt;Protocol:&lt;/strong&gt; &lt;code&gt;TCP&lt;/code&gt;
&lt;strong&gt;Port Range:&lt;/strong&gt; &lt;code&gt;22&lt;/code&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;code&gt;0.0.0.0/0&lt;/code&gt; (Allow access from anywhere)&lt;/li&gt;
&lt;li&gt;Add Outbound Rules: The default outbound rule allows all traffic.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create security group&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F839ub7chbm4jfw6lh10n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F839ub7chbm4jfw6lh10n.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6eauqbtz1mcu1eedt0yg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6eauqbtz1mcu1eedt0yg.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Create Network ACLs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Public Network ACL&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the VPC Dashboard, click on &lt;strong&gt;Network ACLs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create network ACL&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter the following details:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;PublicNACL&lt;/code&gt;
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create network ACL&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add Inbound Rules:
&lt;strong&gt;Rule #:&lt;/strong&gt; &lt;code&gt;100&lt;/code&gt;
&lt;strong&gt;Type:&lt;/strong&gt; &lt;code&gt;SSH&lt;/code&gt;
&lt;strong&gt;Protocol:&lt;/strong&gt; &lt;code&gt;TCP&lt;/code&gt;
&lt;strong&gt;Port Range:&lt;/strong&gt; &lt;code&gt;22&lt;/code&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;code&gt;0.0.0.0/0&lt;/code&gt; (Allow access from anywhere)&lt;/li&gt;
&lt;li&gt;Add Outbound Rules:
&lt;strong&gt;Rule #:&lt;/strong&gt; &lt;code&gt;101&lt;/code&gt;
&lt;strong&gt;Type:&lt;/strong&gt; &lt;code&gt;Custom TCP&lt;/code&gt;
&lt;strong&gt;Protocol:&lt;/strong&gt; &lt;code&gt;TCP&lt;/code&gt;
&lt;strong&gt;Port Range:&lt;/strong&gt; &lt;code&gt;1024-65535&lt;/code&gt;
&lt;strong&gt;Destination:&lt;/strong&gt; &lt;code&gt;0.0.0.0/0&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxly7q068ghkiux61bagf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxly7q068ghkiux61bagf.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjwtj7t3x1hjyceyu4v3y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjwtj7t3x1hjyceyu4v3y.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Associate with Subnet:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select the Subnet: Choose the &lt;code&gt;public subnet&lt;/code&gt; to associate with this NACL.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Create Private Network ACL&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the VPC Dashboard, click on &lt;strong&gt;Network ACLs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create network ACL&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter the following details:
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;PrivateNACL&lt;/code&gt;
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create network ACL&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add Inbound Rules:&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Rule #:&lt;/strong&gt; &lt;code&gt;100&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Type:&lt;/strong&gt; &lt;code&gt;SSH&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Protocol:&lt;/strong&gt; &lt;code&gt;TCP&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Port Range:&lt;/strong&gt; &lt;code&gt;22&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;code&gt;0.0.0.0/0&lt;/code&gt; (Allow access from anywhere)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule #:&lt;/strong&gt; &lt;code&gt;101&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Type:&lt;/strong&gt; &lt;code&gt;Custom TCP&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Protocol:&lt;/strong&gt; &lt;code&gt;TCP&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Port Range:&lt;/strong&gt; &lt;code&gt;1024-65535&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;code&gt;0.0.0.0/0&lt;/code&gt; (Allow access from anywhere)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqn1jozm5jq0ve5qvudvb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqn1jozm5jq0ve5qvudvb.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhogjln0gn5vrhnu2tiym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhogjln0gn5vrhnu2tiym.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Associate with Subnet:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select the Subnet: Choose the &lt;code&gt;private subnet&lt;/code&gt; to associate with this NACL.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;7. Create Ec2 Instance&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on &lt;strong&gt;Launch Instance&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter the following details:
&lt;strong&gt;Name:&lt;/strong&gt; &lt;code&gt;PublicServer&lt;/code&gt;
&lt;strong&gt;AMI:&lt;/strong&gt; Choose an Amazon Linux 2 AMI (HVM), SSD Volume Type
&lt;strong&gt;Instance Type:&lt;/strong&gt; t2.micro (or another type as needed)
&lt;strong&gt;Key Pair:&lt;/strong&gt; Select an existing key pair or create a new one
&lt;strong&gt;Network:&lt;/strong&gt; Select &lt;code&gt;MyVpc&lt;/code&gt;
&lt;strong&gt;Subnet:&lt;/strong&gt; Select &lt;code&gt;PublicSubnet&lt;/code&gt;
&lt;strong&gt;Auto-assign Public IP:&lt;/strong&gt; Enable
&lt;strong&gt;Security Group:&lt;/strong&gt; Select &lt;code&gt;PublicSG&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Launch Instance&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;8. Connect to an EC2 Instance Using EC2 Instance Connect&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the EC2 Dashboard.&lt;/li&gt;
&lt;li&gt;Select the &lt;code&gt;PublicServer&lt;/code&gt; Instance.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Connect&lt;/strong&gt; at the top of the page.&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;EC2 Instance Connect&lt;/strong&gt; as the connection method.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Connect&lt;/strong&gt; to open the terminal.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tmoirrtrgh7xc2rws2j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tmoirrtrgh7xc2rws2j.png" alt="Image description" width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Security Groups (SGs) and Network ACLs (NACLs) are essential for controlling access to AWS resources within a VPC. SGs manage traffic at the instance level with stateful filtering, while NACLs provide stateless filtering at the subnet level. Together, they offer a robust security framework, ensuring both individual instance protection and broader network security within your VPC. This layered approach enhances the overall security and resilience of your AWS environment.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Auto Scalling Groups</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Tue, 27 Aug 2024 18:04:04 +0000</pubDate>
      <link>https://forem.com/clintt/auto-scalling-groups-37en</link>
      <guid>https://forem.com/clintt/auto-scalling-groups-37en</guid>
      <description>&lt;p&gt;&lt;strong&gt;Auto Scaling Groups&lt;/strong&gt; automatically manage the number of EC2 instances in your application to maintain availability and ensure performance. Whether you’re dealing with variable traffic or need to ensure high availability, ASGs have got you covered.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Aim&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To provide a comprehensive guide on how to effectively leverage Auto Scaling Groups (ASGs) in AWS to maintain the availability and performance of your applications. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Objective&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Creating a launch template.&lt;/li&gt;
&lt;li&gt;Configuring an Auto Scaling Group.&lt;/li&gt;
&lt;li&gt;Setting up a target tracking scaling policy.&lt;/li&gt;
&lt;li&gt;Monitoring the performance of EC2 instances under load. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Steps&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Create a Launch Template&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Navigate to EC2:&lt;/strong&gt; Open the Amazon EC2 console.&lt;br&gt;
&lt;strong&gt;Launch Templates:&lt;/strong&gt; In the navigation pane, under Instances, choose Launch templates.&lt;br&gt;
&lt;strong&gt;Create Launch Template:&lt;/strong&gt; Click on "Create launch template".&lt;br&gt;
 &lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhm5epr8fhf04y5hih5j5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhm5epr8fhf04y5hih5j5.png" alt="Image description" width="800" height="352"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Name and Description:&lt;/strong&gt; Provide a name and description for your launch template.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Image:&lt;/strong&gt; Select the desired Amazon Machine Image (AMI).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instance Type:&lt;/strong&gt; Choose the instance type that suits your application's requirements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Pair:&lt;/strong&gt; Select an existing key pair or create a new one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Groups:&lt;/strong&gt; Add or create security groups to control inbound and outbound traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network Settings:&lt;/strong&gt; Configure network interfaces, subnets, and other network-related settings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage:&lt;/strong&gt; Configure root volume and additional EBS volumes as needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advanced Details:&lt;/strong&gt; Customize additional settings like user data, IAM roles, and monitoring.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create Launch Template:&lt;/strong&gt; Click "Create launch template".&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh3jnwm0gwmkewtlh5n0y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh3jnwm0gwmkewtlh5n0y.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create an Auto Scaling Group&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Navigate to Auto Scaling:&lt;/strong&gt; Open the Auto Scaling console.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create Auto Scaling Group:&lt;/strong&gt; Click on "Create Auto Scaling group".
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5de03el84jv915ks2k5f.png" alt="Image description" width="800" height="350"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Basic Configuration:&lt;/strong&gt;
&lt;strong&gt;Auto Scaling group name:&lt;/strong&gt; Provide a name for your Auto Scaling group.
&lt;strong&gt;Launch template:&lt;/strong&gt; Select the launch template you created in step 1.
&lt;strong&gt;VPC:&lt;/strong&gt; Choose the VPC where you want to launch instances.
&lt;strong&gt;Availability Zones:&lt;/strong&gt; Select the desired availability zones.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9ivlt225e9ke9ngrcn8.png" alt="Image description" width="800" height="350"&gt;
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F89zy5mk8tfj4x3ysf7qh.png" alt="Image description" width="800" height="350"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Group Size:&lt;/strong&gt;
&lt;strong&gt;Desired capacity:&lt;/strong&gt; Specify the initial number of instances.
&lt;strong&gt;Minimum capacity:&lt;/strong&gt; Set the minimum number of instances.
&lt;strong&gt;Maximum capacity:&lt;/strong&gt; Set the maximum number of instances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scaling Policies:&lt;/strong&gt; Configure scaling policies based on your application's requirements. This involves defining trigger conditions and scaling actions.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8f16nj8v441ij2suvxtg.png" alt="Image description" width="800" height="350"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tags:&lt;/strong&gt; Add tags to your Auto Scaling group for organization and filtering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create Auto Scaling Group:&lt;/strong&gt; Click "Create Auto Scaling group".
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mnvnrgdjfwntxldh3rp.png" alt="Image description" width="800" height="350"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Based on the desired capacity, Auto Scalling group will spin up two ec2 instances. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr2nim1dqcjch3lvxqiks.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr2nim1dqcjch3lvxqiks.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Create a Target Tracking Scaling Policy&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Navigate to Automatic Scaling:&lt;/strong&gt; Open the Auto Scaling Group and go to the "Automatic scaling" tab.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add Scaling Policy:&lt;/strong&gt; Under the "Target tracking scaling policies" section, click on "Create policy."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Select Policy Type:&lt;/strong&gt; Choose "Target tracking scaling policy" as the policy type.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configure Policy:&lt;/strong&gt;
&lt;strong&gt;Policy Name:&lt;/strong&gt; Enter a name for your scaling policy.
&lt;strong&gt;Metric Type:&lt;/strong&gt; Select a predefined metric like Average CPU Utilization or use a custom CloudWatch metric.
&lt;strong&gt;Target Value:&lt;/strong&gt; Input the desired target value (e.g., 50 for 50% CPU utilization).
&lt;strong&gt;Instance Warm-Up Period:&lt;/strong&gt; Specify the warm-up period for new instances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create the Policy:&lt;/strong&gt; Click "Create" to finalize and activate the scaling policy.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fju2rxk4ouih27yyemij5.png" alt="Image description" width="800" height="350"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;4. Install the Stress Tool on Your EC2 Instance&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Connect via SSH:&lt;/strong&gt; Use Amazon EC2 Instance Connect to connect to your EC2 instance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install the Stress Tool:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run the Stress Command:&lt;/strong&gt; Generate CPU load by running the following command.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo yum install -y stress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stress --cpu 2 --timeout 300
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffm5fsawsn3fmf21jzt7q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffm5fsawsn3fmf21jzt7q.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Monitor Auto Scaling Group:&lt;/strong&gt; Click on your Auto Scaling Group to view its details, then go to the Activity tab to see scaling actions as new instances are added.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fywgmtctwbsvu9i7yhktw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fywgmtctwbsvu9i7yhktw.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Monitor Instances:&lt;/strong&gt; In the EC2 Dashboard, under the Instances tab, you should the third instance launching as the load increases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xi5kyymd4b6ee4val5w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xi5kyymd4b6ee4val5w.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Auto Scaling Groups (ASGs) in AWS automatically adjust the number of EC2 instances to match demand, ensuring high availability and performance without manual intervention. With health checks, load balancing, and customizable scaling policies, ASGs offer a flexible and efficient solution for managing cloud resources, making them vital for scalable and resilient cloud architectures.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>asg</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>User Creation Aumation in Linux with a Bash Script</title>
      <dc:creator>Clinton Ogechi</dc:creator>
      <pubDate>Tue, 02 Jul 2024 16:00:42 +0000</pubDate>
      <link>https://forem.com/clintt/user-creation-aumation-in-linux-with-a-bash-script-630</link>
      <guid>https://forem.com/clintt/user-creation-aumation-in-linux-with-a-bash-script-630</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In the world of a SysOps engineer, one of the common tasks you will encouter is the creation and management of users and groups. Automation helps simplify this process, making it efficient and time saving. In this blog post, we'll go through a bash script createusers.sh that automates the creation of users and groups, set up home directories with appropriate permissions and ownership, generate random passwords for the users, and log all actions.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Breaking down the script&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here is the complete script created in create_users.sh with and an explanation of each section.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

# Define the log &amp;amp; password file variables
LOG_FILE="/var/log/user_management.log"
PASSWORD_FILE="/var/secure/user_passwords.csv"

# Create and set permissions for log and password files
touch $LOG_FILE
mkdir -p /var/secure
touch $PASSWORD_FILE
chmod 600 $PASSWORD_FILE

# Generate a random password for a user
generate_password() {
  tr -dc A-Za-z0-9 &amp;lt;/dev/urandom | head -c 12
}

# Check if the file is provided
if [ -z "$1" ]; then
  echo "Usage: $0 &amp;lt;user_file&amp;gt;"
  exit 1
fi
USER_FILE="$1"

# Process each line of the user file
while IFS=";" read -r username groups; do
  # Remove leading and trailing whitespace from username and groups
  username=$(echo $username | xargs)
  groups=$(echo $groups | xargs)

  # If a user does not exist, create user and personal group
  if ! id -u $username &amp;gt;/dev/null 2&amp;gt;&amp;amp;1; then
    useradd -m -s /bin/bash $username
    echo "$(date) - Created user: $username" &amp;gt;&amp;gt; $LOG_FILE

    # Generate a password for the user
    password=$(generate_password)
    echo "$username,$password" &amp;gt;&amp;gt; $PASSWORD_FILE
    echo "$username:$password" | chpasswd

    # Set appropriate permissions and ownership for home directory
    chown -R "$username:$username" "/home/$username"
    chmod 700 "/home/$username"

    # Assign the user to the specified groups
    if [ -n "$groups" ]; then
      IFS=',' read -r -a group_array &amp;lt;&amp;lt;&amp;lt; "$groups"
      for group in "${group_array[@]}"; do
        if ! getent group $group &amp;gt;/dev/null; then
          groupadd $group
          echo "$(date) - Created group: $group" &amp;gt;&amp;gt; $LOG_FILE
        fi
        usermod -aG $group $username
        echo "$(date) - Added $username to group: $group" &amp;gt;&amp;gt; $LOG_FILE
      done
    fi
  else
    echo "$(date) - User $username already exists" &amp;gt;&amp;gt; $LOG_FILE
  fi
done &amp;lt; "$USER_FILE"
echo "The user creation process is completed."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Explanation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Defining the log &amp;amp; password file variables:&lt;/strong&gt; We define the paths for the log file and the password storage file. It also ensures that a secure directory for password storage is created with the neccesary permissions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LOG_FILE="/var/log/user_management.log"
PASSWORD_FILE="/var/secure/user_passwords.csv"

touch $LOG_FILE
touch $PASSWORD_FILE
chmod 600 $PASSWORD_FILE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Processing the Input File:&lt;/strong&gt; The script reads the input file provided. Each line is expected to have a username and a list of groups separated by a semicolon. The script processes each line, removing any leading or trailing whitespace from username and groups.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if [ -z "$1" ]; then
  echo "Usage: $0 &amp;lt;user_file&amp;gt;"
  exit 1
fi
USER_FILE="$1"

while IFS=";" read -r username groups; do
  # Remove leading and trailing whitespace from username and groups
  username=$(echo $username | xargs)
  groups=$(echo $groups | xargs)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Generating Random Passwords:&lt;/strong&gt; This script generates random passwords for each user using a secure method. These passwords are then stored in a directory; /var/secure/user_passwords.csv, with the neccesary file permissions set to ensure only the owner can read it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;generate_password() {
  tr -dc A-Za-z0-9 &amp;lt;/dev/urandom | head -c 12
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Function to Create Users and Groups:&lt;/strong&gt; This script creates each user and their group, as well as any additional groups. If the user or group already exists, the script logs a message and skips to the next entry. It sets up home directories with appropriate permissions and ownership.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if ! id -u $username &amp;gt;/dev/null 2&amp;gt;&amp;amp;1; then
    useradd -m -s /bin/bash $username
    echo "$(date) - Created user: $username" &amp;gt;&amp;gt; $LOG_FILE

    password=$(generate_password)
    echo "$username,$password" &amp;gt;&amp;gt; $PASSWORD_FILE
    echo "$username:$password" | chpasswd

    chown -R "$username:$username" "/home/$username"
    chmod 700 "/home/$username"

    if [ -n "$groups" ]; then
      IFS=',' read -r -a group_array &amp;lt;&amp;lt;&amp;lt; "$groups"
      for group in "${group_array[@]}"; do
        if ! getent group $group &amp;gt;/dev/null; then
          groupadd $group
          echo "$(date) - Created group: $group" &amp;gt;&amp;gt; $LOG_FILE
        fi
        usermod -aG $group $username
        echo "$(date) - Added $username to group: $group" &amp;gt;&amp;gt; $LOG_FILE
      done
    fi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Running the Script
&lt;/h2&gt;

&lt;p&gt;Before executing the script, ensure it has executable permissions. You can make it executable by granting the necessary permissions using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod +x create_users.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the Script with Root Privileges.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ./create_users.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After executing the script, it will display messages confirming the creation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This bash script helps automate user creation and management making the process easier and saves time. This ensures all actions are logged and passwords stored securely. &lt;/p&gt;

&lt;p&gt;To learn about this and more, check out &lt;a href="https://hng.tech/internship" rel="noopener noreferrer"&gt;HNG Internship&lt;/a&gt; and also check out &lt;a href="https://hng.tech/hire" rel="noopener noreferrer"&gt;HNG Hire&lt;/a&gt; for top talents.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
