<?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>DEV Community: Ashutosh Mallick</title>
    <description>The latest articles on DEV Community by Ashutosh Mallick (@atm_06).</description>
    <link>https://dev.to/atm_06</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%2F795857%2F83770a9f-2c8f-4fbc-a83d-1d83b64e77de.jpeg</url>
      <title>DEV Community: Ashutosh Mallick</title>
      <link>https://dev.to/atm_06</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/atm_06"/>
    <language>en</language>
    <item>
      <title>Bastion Host Setup In Azure Console</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Tue, 09 Aug 2022 06:59:19 +0000</pubDate>
      <link>https://dev.to/atm_06/bastion-host-setup-in-azure-console-1m91</link>
      <guid>https://dev.to/atm_06/bastion-host-setup-in-azure-console-1m91</guid>
      <description>&lt;p&gt;&lt;strong&gt;Bastion Host&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A bastion host is a server whose purpose is to provide access to a private network from an external network, such as the Internet. Because of its exposure to potential attack, a bastion host must minimize the chances of penetration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the difference between a firewall and a bastion host?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A bastion host is a dedicated server that lets authorized users access a private network from an external network such as the internet. Placed outside the firewall or within a DMZ, the bastion host becomes the only ingress path to those internal resources.&lt;/p&gt;

&lt;p&gt;If we want to SSH into a VM on the private subnet from our home/office (or using a development machine), currently we can’t. Our instance has no public IP, it is in a Private Subnet (no direct route from the internet). This is where we can use a Bastion Server or Jump server.&lt;/p&gt;

&lt;p&gt;Azure Bastion is deployed to a virtual network and supports virtual network peering. &lt;br&gt;
Specifically, Azure Bastion manages RDP/SSH connectivity to VMs created in the local or peered virtual networks.&lt;/p&gt;

&lt;p&gt;Exposing RDP/SSH ports over the Internet isn't desired and is seen as a significant threat surface. This is often due to protocol vulnerabilities. To contain this threat surface, you can deploy bastion hosts (also known as jump-servers) at the public side of your perimeter network. &lt;/p&gt;

&lt;p&gt;Bastion host servers are designed and configured to withstand attacks. Bastion servers also provide RDP and SSH connectivity to the workloads sitting behind the bastion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network Security Group (NSG)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A network security group, or NSG, allows or denies inbound network traffic to your Azure resources. Think of a NSG as a cloud-level firewall for your network. &lt;/p&gt;

&lt;p&gt;For example, notice that the a VM allows inbound traffic on ports 22 (SSH) and 80 (HTTP). This VM’s network security group allows inbound traffic over these ports from all sources as default. But we can configure a network security group to accept traffic only from known sources, such as IP addresses that you trust or your local PC IP address.  &lt;/p&gt;

&lt;p&gt;NSGs can be associated with subnets or individual virtual machine instances within that subnet. When an NSG is associated with a subnet, the ACL rules apply to all Virtual Machine instances of that subnet. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NSG Architecture:&lt;/strong&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%2Foj5hh98lawrn54grsoy2.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%2Foj5hh98lawrn54grsoy2.png" alt="Image description" width="800" height="484"&gt;&lt;/a&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%2Ffuoe0yu9he5jrbqlg9yo.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%2Ffuoe0yu9he5jrbqlg9yo.png" alt="Image description" width="800" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bastion Host Setup Architecture:&lt;/strong&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%2Fzfsepboxh7kyjduvx7d7.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%2Fzfsepboxh7kyjduvx7d7.png" alt="Image description" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment of Resources:&lt;/strong&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%2Fkp0qhvn78bkj4769g9w6.jpg" 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%2Fkp0qhvn78bkj4769g9w6.jpg" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a Resource group (NSG-RG):&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%2Fqh4v46qe3m5zd3uet4zc.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%2Fqh4v46qe3m5zd3uet4zc.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a Virtual network (NSG-vnet) [CIDR- 10.0.0.0/16]&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%2F1o3l5og7grnc770ghv51.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%2F1o3l5og7grnc770ghv51.png" alt="Image description" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add subnet-1 (NSG-subnet-1) with CIDR value “10.0.1.0/24"&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%2Fiww40wvxik8yfyvwiuez.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%2Fiww40wvxik8yfyvwiuez.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add subnet-2 (NSG-subnet-2) with CIDR value “10.0.2.0/24”&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%2Fp97k435liodltv60ko3x.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%2Fp97k435liodltv60ko3x.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create VM-1 (Bastion host in Subnet-1). Allow public IP to it.&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%2F9rljeu1l1ny443qht201.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%2F9rljeu1l1ny443qht201.png" alt="Image description" width="800" height="449"&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%2F0wtk1cvt1f5sdmierksz.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%2F0wtk1cvt1f5sdmierksz.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this case NSG is applied to server by default. We can also attach NSG at subnet level. There are two rules i.e, Inbound rules and outbound rules in NSG.&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%2Fo0tyjof7ioohc31cl2q1.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%2Fo0tyjof7ioohc31cl2q1.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create another VM (Web-server) inside Subnet-1. We can assign public Ip to the server.&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%2F1r8a3ktwulese0182e2x.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%2F1r8a3ktwulese0182e2x.png" alt="Image description" width="800" height="351"&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%2Fu1pdsg6hxbleethk5ppy.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%2Fu1pdsg6hxbleethk5ppy.png" alt="Image description" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create DB-server inside Subnet-2. Assign private ip to it.&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%2Fp8m15zun4ft2d5kqyj78.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%2Fp8m15zun4ft2d5kqyj78.png" alt="Image description" width="800" height="449"&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%2F8ge94wd6s7vvv6i4jz32.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%2F8ge94wd6s7vvv6i4jz32.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inside inbound port there is a RDP port of source any and destination any , this means anyone can RDP into my server.&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%2Fuw0vsabafv5vlpfmbo0e.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%2Fuw0vsabafv5vlpfmbo0e.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let’s create an inbound rule so that it can only allow my local desktop IP , to do that we have to put our ipv4 ip inside source IP addresses. Delete the previous inbound port security rule.&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%2F30c2dk82boemyxiaaes8.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%2F30c2dk82boemyxiaaes8.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add a new inbound port rule with source as your local PC ip address. Select service as RDP and protocol as TCP.&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%2F1tr6ejldp7qvmhdvpglb.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%2F1tr6ejldp7qvmhdvpglb.png" alt="Image description" width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After editing this inbound port rule, NSG will only allow my local server IP to access the Bastion-host server via RDP. We can’t access the bastion-host from any other PC. &lt;/p&gt;

&lt;p&gt;If we want to allow multiple PC to be able to access the bastion host, we can edit the inbound port rule and in place of source we can put the respective IP address of the PCs.&lt;/p&gt;

&lt;p&gt;Suppose we don’t want a particular IP to access my Virtual machine, then create an inbound port and put that IP inside the source IP addresses and inside the destination IP addresses put this VM IP and select deny option in action.&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%2Fkcfwh3tv1yxqcujuqsmn.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%2Fkcfwh3tv1yxqcujuqsmn.png" alt="Image description" width="800" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We cannot directly RDP into our DB-server because it has only private IP, so in order to RDP we need a server that has a public ip and should present in the same network.&lt;/p&gt;

&lt;p&gt;So, we use the Bastion-host or Jump-server to access the DB-server as they exist in the same network. Let’s Connect DB-server from inside Bastion-host.&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%2Fo80e7etzkpon5lbptqmw.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%2Fo80e7etzkpon5lbptqmw.png" alt="Image description" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Connection established to DB-server via RDP from Bastion-host.&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%2Fh5sk57tdq09n8b88uq2d.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%2Fh5sk57tdq09n8b88uq2d.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly, connection to DB-server can be established by WEB-server as they exist in the same network.&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%2F7nfufr59eksm4rodwmsi.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%2F7nfufr59eksm4rodwmsi.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Connection established with DB-server from Web-server via RDP.&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%2F10ugu3u3wjp2uyhrr4h4.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%2F10ugu3u3wjp2uyhrr4h4.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But our Connection to DB-server should only be restricted to Jump-server only. To solve this, we need to change inbound rule configurations of NSG of DB-server.&lt;/p&gt;

&lt;p&gt;First delete the existing rule for RDP.&lt;br&gt;
Add inbound rule as following :&lt;br&gt;
Source: IP address of web-server&lt;br&gt;
Destination: IP address of DB-server&lt;br&gt;
Service: RDP&lt;br&gt;
Protocol: Any&lt;br&gt;
Priority: 210(say)&lt;br&gt;
Name: 3389_port_block&lt;br&gt;
Action: Deny&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%2F9sybocnfphg88y11nwtc.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%2F9sybocnfphg88y11nwtc.png" alt="Image description" width="800" height="449"&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%2Fgbm5hrv2n9wlgqetgu4g.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%2Fgbm5hrv2n9wlgqetgu4g.png" alt="Image description" width="800" height="449"&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%2Fz9wtvjcgdc4rpppzkybi.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%2Fz9wtvjcgdc4rpppzkybi.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let’s try connecting DB-server again from inside WEB-server via RDP. We can see that the connection can’t be established.&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%2F2uvra2zsbgs8jlfsfyyq.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%2F2uvra2zsbgs8jlfsfyyq.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we try connecting internet from DB-server from via Jump server we can see that DB-server has internet access. &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%2Fkwmcuk6eg7p880810p5q.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%2Fkwmcuk6eg7p880810p5q.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To restrict internet access to DB-server we need to edit the Outbound rules of DB-server.&lt;br&gt;
Add Outbound rule as following:&lt;br&gt;
Source: Any&lt;br&gt;
Destination: Service Tag&lt;br&gt;
Destination Service Tag: Internet&lt;br&gt;
Destination port range: 8080&lt;br&gt;
Action: Deny&lt;br&gt;
Priority: 200(say)&lt;br&gt;
Add rule.&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%2Fuhftsovjzl7gt02nijqj.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%2Fuhftsovjzl7gt02nijqj.png" alt="Image description" width="800" height="449"&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%2Fki7op3l0jkfgw0wsgizv.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%2Fki7op3l0jkfgw0wsgizv.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now our deployment and setup for connecting a database server via bastion host is successfully established.&lt;/p&gt;

&lt;p&gt;Drop your views regarding this. &lt;br&gt;
Thank you!!&lt;/p&gt;

</description>
      <category>bastionhost</category>
      <category>jumpserve</category>
      <category>azure</category>
      <category>cloud</category>
    </item>
    <item>
      <title>VPC Networking</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Thu, 21 Jul 2022 05:45:08 +0000</pubDate>
      <link>https://dev.to/atm_06/vpc-networking-174</link>
      <guid>https://dev.to/atm_06/vpc-networking-174</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is VPC?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The AWS VPC is essentially a private virtual network inside the AWS network. While AWS is &lt;br&gt;
physically a shared network, each VPC is logically isolated from other AWS customers. The AWS &lt;br&gt;
network supports private and public addresses for each of its customers&lt;br&gt;
AWS customers are logically separated, there is no contention for IP address space between VPCs. Each VPC will &lt;br&gt;
have its own routing table that is responsible for directing traffic.&lt;br&gt;
Below image shows the logical isolation of AWS customers.&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%2Flov15i1xh288qsga0z6c.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%2Flov15i1xh288qsga0z6c.png" alt="Image description" width="549" height="395"&gt;&lt;/a&gt;&lt;br&gt;
** What is Subnetting?**&lt;br&gt;
To understand what Subnetting is, first we have to understand what &lt;br&gt;
exactly is the Network and Subnet&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Network?&lt;/strong&gt;&lt;br&gt;
A network is a group of two or more connected computing devices. Usually all devices in the network are connected to a central hub — for instance, a router. A network can also include subnetworks, or smaller subdivisions of the network&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Subnet ?&lt;/strong&gt; &lt;br&gt;
A subnet, or subnetwork, is a network inside a network. Subnets make networks more efficient. Through subnetting, network traffic can travel a shorter distance without passing through unnecessary routers to reach its destination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Subnetting ?&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%2Flnsmvsk46qakb83o4jmx.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%2Flnsmvsk46qakb83o4jmx.png" alt="Subnetting" width="291" height="208"&gt;&lt;/a&gt;&lt;br&gt;
Subnetting/Subnetworking is how very large networks, such as those &lt;br&gt;
provided by ISPs, are able to manage thousands of IP addresses and &lt;br&gt;
connected devices.&lt;br&gt;
In simple words: Dividing bigger networks into smaller networks called Subnetting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CIDR&lt;/strong&gt;&lt;br&gt;
CIDR stands for (Classless Inter-Domain Routing) -- also known as supernetting. It's a method of assigning Internet Protocol (IP) addresses that improves the efficiency of address distribution and replaces the previous system based on Class A, Class B and Class C networks.&lt;/p&gt;

&lt;p&gt;For each VPC we setup, we have to assign a CIDR value say(10.0.0.0/16).&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%2Fab5p1tha15t5fgomotkc.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%2Fab5p1tha15t5fgomotkc.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
CIDR range depends upon the no. of servers going to be deployed.&lt;br&gt;
Here, the variable values of CIDR vary from 0 to 255.&lt;br&gt;
But first four values i.e, from "10.0.0.0" to "10.0.0.3/16" are reserved and "10.0.0.255/16" is also reserved.&lt;/p&gt;

&lt;p&gt;For each subnet we create, we restrict public and private resources to different subnets. Each subnet is assigned to different IP.&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%2F2jwbm8y7ej3sbyytkukq.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%2F2jwbm8y7ej3sbyytkukq.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here '/24' means first 3 bits of IP will be kept constant.&lt;br&gt;
For Subnet-1 Ip address ranges from 10.0.0.4 to 10.0.0.254.&lt;br&gt;
For Subnet-2 Ip address ranges from 10.0.1.4 to 10.0.1.254.&lt;br&gt;
For Subnet-3 Ip address ranges from 10.0.2.4 to 10.0.2.254. &lt;/p&gt;

&lt;p&gt;Basically, we deploy our different services into different subnets. Such as we keep web-servers in a single subnet, Database servers in a different private subnet.&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%2F77evh3wda3pcqucmuwio.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%2F77evh3wda3pcqucmuwio.png" alt="Image description" width="800" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VPC DEPLOYMENT:&lt;/strong&gt;&lt;br&gt;
Create a VPC "Silicon-Vpc"  (say).&lt;br&gt;
Give an IPV4 CIDR to it (10.0.0.0/16).&lt;/p&gt;

&lt;p&gt;Create two Subnets inside it, Web-subnet and DB-subnet.&lt;br&gt;
Assign CIDR values to the subnet as "10.0.1.0/24" and "10.0.2.0/24" respectively.&lt;/p&gt;

&lt;p&gt;Now select "Web-subnet" and edit subnet settings. Enable the auto-assign public IP in order to allow public access to all the web-servers inside the subnet.&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%2Fukd3jc7nepseabqp02qn.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%2Fukd3jc7nepseabqp02qn.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fwf2w52g88it2g44js53o.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%2Fwf2w52g88it2g44js53o.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fr95upcywm67bzw9vkd1t.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%2Fr95upcywm67bzw9vkd1t.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2F65c5qok1lt3jr2wk2pnr.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%2F65c5qok1lt3jr2wk2pnr.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2F5ro69yrudr7p918uvd91.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%2F5ro69yrudr7p918uvd91.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see that for each subnet we can allocate 251 servers (According to the CIDR values available).&lt;/p&gt;

&lt;p&gt;Now let's launch instance say linux servers. Set VPC as "Silicon-vpc" and subnet as "Web-subnet".&lt;br&gt;
Create a new key pair and launch.&lt;br&gt;
Similarly launch another instance into DB-subnet.&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%2F2jg7zp5d869wy297bdxz.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%2F2jg7zp5d869wy297bdxz.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2F8y048dwkxk670viwqum5.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%2F8y048dwkxk670viwqum5.png" alt="Image description" width="800" height="450"&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%2Fb0hp440kbds32g7lgece.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%2Fb0hp440kbds32g7lgece.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Connect web-server using SSH. We can see that we won't be able to connect.&lt;br&gt;
It is because we have not attached the internet gateway to give the web-server internet access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Internet Gateway?&lt;/strong&gt;&lt;br&gt;
An internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows communication between your VPC and the internet.&lt;/p&gt;

&lt;p&gt;An internet gateway serves two purposes:&lt;br&gt;
1) to provide a target in your VPC route tables for internet-routable traffic.&lt;br&gt;
2) to perform network address translation(NAT) for instances that have been assigned public IPv4 addresses.&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%2F1z6t9tpqzkgne1zakipk.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%2F1z6t9tpqzkgne1zakipk.png" alt="Image description" width="800" height="492"&gt;&lt;/a&gt;&lt;br&gt;
Now we'll deploy an IGW.&lt;br&gt;
Create an IGW " Silicon-IGW". Attach a vpc to it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IGW Creation:&lt;/strong&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%2Fsjdis2v4yjxw21wo41bd.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%2Fsjdis2v4yjxw21wo41bd.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fn07dh7868jg12lt75yy6.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%2Fn07dh7868jg12lt75yy6.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fxes3ml3vsz4b9r80l3tg.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%2Fxes3ml3vsz4b9r80l3tg.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we still won't be able to connect as Route table is undefined.&lt;br&gt;
So we have to create and define the route table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is VPC Route Table?&lt;/strong&gt;&lt;br&gt;
Your VPC has an implicit router, and you use route tables to control where network traffic is directed. Each subnet in your VPC must be associated with a routing table, which controls the routing for the subnet (subnet route table). &lt;/p&gt;

&lt;p&gt;You can explicitly associate a subnet with a particular route table. Otherwise, the subnet is implicitly associated with the main route table. &lt;/p&gt;

&lt;p&gt;A subnet can only be associated with one route table at a time, but you can associate multiple subnets with the same subnet route&lt;br&gt;
table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public Subnet:&lt;/strong&gt; If a subnet is associated with a route table that has a route to an internet gateway, it's known as a public subnet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Private Subnet:&lt;/strong&gt; If a subnet is associated with a route table that does not have a route to an internet gateway, it's known as a private subnet.&lt;/p&gt;

&lt;p&gt;In the public subnet's route table, we can specify a route for the internet gateway to all destinations not explicitly known to the route table (0.0.0.0/0 for IPv4 or ::/0 for IPv6).&lt;/p&gt;

&lt;p&gt;Alternatively, we can scope the route to a narrower range of IP addresses; for example, the public IPv4 addresses of your company’s public endpoints outside of AWS, or the Elastic&lt;br&gt;
IP addresses of other Amazon EC2 instances outside your VPC.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Route Table Creation:&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%2Fctrt9luashijcoyiw7yk.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%2Fctrt9luashijcoyiw7yk.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2F2fd39d2rru5jol8z2fdj.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%2F2fd39d2rru5jol8z2fdj.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fv9sl24ickxzwt64o90rj.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%2Fv9sl24ickxzwt64o90rj.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fzn86q3dt6v6hk1olagdx.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%2Fzn86q3dt6v6hk1olagdx.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2F2uv5nouhr02dg1509ch0.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%2F2uv5nouhr02dg1509ch0.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we'll be able to connect to the web-server via ssh.&lt;br&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%2Fey5md80ncdtmgw2d5p22.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%2Fey5md80ncdtmgw2d5p22.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
But we can't access the DB-server as it doesn't have public IP.&lt;br&gt;
Similarly, we can't connect DB-server from Web-server console as we don't have access to "Db-server-key.pem' file.&lt;/p&gt;

&lt;p&gt;So let's make a pem file using vi editor and save contents of  Db-server-key.pem file to vi editor.&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%2Fgg7k90b3a7ad9vjq8xl4.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%2Fgg7k90b3a7ad9vjq8xl4.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we've to give read-write permission to the server.&lt;/p&gt;

&lt;p&gt;Type: "chmod 600 DB-server-key.pem"&lt;/p&gt;

&lt;p&gt;Now we'll be able to access the Db-server via Web-server.&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%2Frlvvahclcmbtmozh4nf7.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%2Frlvvahclcmbtmozh4nf7.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
We can verify that Web-server has access to internet by using command "ping 8.8.8.8".&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%2Fxxuibcee20x0fg11gjjd.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%2Fxxuibcee20x0fg11gjjd.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But DB-server can't access the internet.&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%2F98kobv5f36ayurt0nw5n.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%2F98kobv5f36ayurt0nw5n.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we want to give internet access to DB-server we have to configure it in such a manner that no one else from the internet can access it except us.&lt;/p&gt;

&lt;p&gt;To have such kind of setup we deploy "NAT-Gateway".&lt;br&gt;
"Nat-gatweway has both private and public IP associated with it.&lt;br&gt;
We need to deploy it in Public subnet. Hence, the subnet having IGW access is called public subnet.&lt;/p&gt;

&lt;p&gt;If DB-Subnet wants to have internet access then it has to connect to the public ip of NAT gateway.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>vpc</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Static Website hosting on AWS S3</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Wed, 13 Jul 2022 06:08:19 +0000</pubDate>
      <link>https://dev.to/atm_06/static-website-hosting-on-aws-s3-286n</link>
      <guid>https://dev.to/atm_06/static-website-hosting-on-aws-s3-286n</guid>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;p&gt;On continuation to my previous documentation regarding S3 services and their usage, we'll discuss about static website hosting using s3 services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The first step to hosting a static website on AWS S3 is to create an S3 bucket in your account. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After creating the bucket, we will upload the website contents and files in our bucket. The website content will then be assigned specific permissions to be accessible to the public.&lt;/p&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%2Fuymvv591vqdadhswr001.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%2Fuymvv591vqdadhswr001.png" alt="Image description" width="800" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;create the bucket and the bucket name should be unique for all AWS accounts around the world:&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%2Frfud2k63n56til0drh3a.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%2Frfud2k63n56til0drh3a.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Since we want the website to be publicly accessible, we need to grant the public access to the objects of this S3 bucket. For that, uncheck the Block all public access checkbox in the “Block Public Access setting for this bucket” section.&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%2F4w0w471jxfg96hksq30j.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%2F4w0w471jxfg96hksq30j.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;After configuring the public access settings, a section will appear to acknowledge the S3 bucket and its content being made public. Check the box to acknowledge it.&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%2Fpd6n5cp9bvg86unw3cwx.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%2Fpd6n5cp9bvg86unw3cwx.png" alt="Image description" width="665" height="559"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now download a sample website. Extract it and copy the contents of the folder into your TNT drive folder you created earlier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to the Objects section, and then Click on the upload button. Now, browse your system for the directory you want to upload into the S3 bucket. Select the static website directory and upload it to the S3 bucket.&lt;/p&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%2Fzbu49ub0qbu9hkv3a96w.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%2Fzbu49ub0qbu9hkv3a96w.png" alt="Image description" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uploading the static site content may take some time depending upon the size of the folder:&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%2Fstfxttt8tfo7k4xqkpww.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%2Fstfxttt8tfo7k4xqkpww.png" alt="Image description" width="800" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;After a successful upload, click close at the right corner. You will be directed back to the object section.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now go to AWS S3 console. Select your bucket and select all objects, make them public.&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%2Faty1zt9xdsqn6fliu6j3.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%2Faty1zt9xdsqn6fliu6j3.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After uploading the static site content, enable hosting on your S3 bucket. In order to allow static website hosting on your S3 bucket, go to the properties tab from the top menu in the S3 bucket.&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%2F07wp59kxy1q6d05m42p1.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%2F07wp59kxy1q6d05m42p1.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scroll down in properties tab and look for the Static Website Hosting section.&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%2Fsi74be1y0nzjwlriqnw0.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%2Fsi74be1y0nzjwlriqnw0.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the Edit button in the Static website hosting section and enable the hosting.&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%2Fodjh6ry7v147ob1doo2k.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%2Fodjh6ry7v147ob1doo2k.png" alt="Image description" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After enabling static website hosting, specify the index file of your project (the opening page of your website or webapplication). In this case, it is index.html.&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%2Fi0pay2viktzoqbwg0nye.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%2Fi0pay2viktzoqbwg0nye.png" alt="Image description" width="655" height="174"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Also, if there is an error file in your project, you must specify it in the error document field. This will appear in case your actual web page is not reachable. Now. click on the Save changes button to apply the changes to your S3 bucket.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now, our S3 bucket is hosting the website content uploaded to it and is publicly accessible. In order to access the website, we need a public URL that AWS itself provides. This URL can be seen in the static website hosting section of the S3 bucket.&lt;/p&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%2Fdzmv605f4mgwf65d7b31.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%2Fdzmv605f4mgwf65d7b31.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To make our content accessible publicly, we need to add a bucket policy for which we have to go to the permissions tab of our S3 bucket to make some changes to the permissions of our S3 bucket.&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%2Fcldk3v6pjgp6rdsgv59r.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%2Fcldk3v6pjgp6rdsgv59r.png" alt="Image description" width="800" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste the following JSON in the editor to allow the public to read files from the bucket:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;{&lt;br&gt;
    "Version": "2012-10-17",&lt;br&gt;
    "Statement": [&lt;br&gt;
        {&lt;br&gt;
            "Sid": "PublicRead",&lt;br&gt;
            "Effect": "Allow",&lt;br&gt;
            "Principal": "&lt;em&gt;",&lt;br&gt;
            "Action": [&lt;br&gt;
                "s3:GetObject",&lt;br&gt;
                "s3:GetObjectVersion"&lt;br&gt;
            ],&lt;br&gt;
            "Resource": "arn:aws:s3:::YOUR-S3-BUCKETNAME/&lt;/em&gt;"&lt;br&gt;
        }&lt;br&gt;
    ]&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;-Make sure to replace “YOUR-S3-BUCKETNAME” with your S3 bucket name in the JSON policy.&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%2F3cad56mrp1qkodbb9e6k.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%2F3cad56mrp1qkodbb9e6k.png" alt="Image description" width="800" height="450"&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%2F455btbsklj3zdezx01x2.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%2F455btbsklj3zdezx01x2.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;After setting the permissions for the bucket, it’s time to access the webpage through the URL. For this, go to the Objects tab of the S3 bucket and go to the static site directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Look for the index.html file in the folder, which you defined as the index document for this project. Click on the index.html file.&lt;/p&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%2Ffc6it66v1wfg9crdbshe.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%2Ffc6it66v1wfg9crdbshe.png" alt="Image description" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now, in the object overview section under the properties tab, you can find the URL of the static website.&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%2Fnk986otknha8wf4kr797.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%2Fnk986otknha8wf4kr797.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to this URL, and the static website hosted on the AWS S3 bucket will be accessible via 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%2F7hm8r5ttbafkavmm8ab0.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%2F7hm8r5ttbafkavmm8ab0.png" alt="Image description" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In this article, we went through the configuration of a static website using the AWS S3 bucket. We can use a custom domain to launch the static website via configuration using AWS Route 53 services. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can create the website pages, upload them into an S3 bucket, and users can access the website. You do not require to maintain any backend servers. It is a serverless architecture, and AWS manages them for you automatically.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you!! Stay tuned for more exciting stuff on AWS services and provide your feedback in the comments.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>s3</category>
      <category>webhosting</category>
      <category>cloud</category>
    </item>
    <item>
      <title>AWS Simple Storage Services(s3). S3 buckets, mapping of S3 objects as network drive.</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Wed, 06 Jul 2022 05:31:06 +0000</pubDate>
      <link>https://dev.to/atm_06/aws-simple-storage-servicess3-s3-buckets-mapping-of-s3-objects-as-network-drive-48g1</link>
      <guid>https://dev.to/atm_06/aws-simple-storage-servicess3-s3-buckets-mapping-of-s3-objects-as-network-drive-48g1</guid>
      <description>&lt;p&gt;&lt;strong&gt;Amazon S3&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Simple Storage Service is a scalable, high-speed, low-cost web-based service designed for online backup and archiving of data and application programs. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We can use S3 to store and retrieve any amount of data at any time, from anywhere on the web. It allows to upload, store, and download any type of &lt;u&gt;files up to 5 GB in size&lt;/u&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This service allows the subscribers to access the same systems that Amazon uses to run its own web sites. The subscriber has control over the accessibility of data, i.e. privately/publicly&lt;br&gt;
accessible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Since S3 is an object storage, it's not divided into multiparts or exists as a single storage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you modify a file in block storage, only the pieces that are changed are updated. When a file in object storage is modified, the entire object is updated.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In object storage, each object consists of data, metadata, and a key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The data might be an image, video, text document, or any other type of file. Metadata contains information about what the data is, how it is used, the object size, and so on. An object’s key is its unique identifier.&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%2Fu7oc9igaqot0pqqb4nt0.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%2Fu7oc9igaqot0pqqb4nt0.png" alt="Metadata, key" width="698" height="204"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Provisioning before S3&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It's important to keep backup of your data. But before s3 for backup of data, we used  to attach the servers to on premises SAN storage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For SAN storage, due to its hardware lifetime, we need to regularly change the on premises services or hardware disk drives, which was a costlier process. Thus AWS introduced S3 services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;S3 buckets stores backup of your servers and it's very cheap. Such as for storing 1GB data costs you $0.01/month. But cost varies accordingly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;According to Aws SLA, for S3 bucket the data is 99.999999% available and durable. AWS makes three copies of data present in S3 bucket. One copy remains with the user while the other two copies are stored in other data centers. Hence you'll have high SLA.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;S3 Buckets&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A bucket is a container for objects stored in Amazon S3. You can store any number of objects in a bucket and can have up to 100 buckets in your account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you create a bucket, you enter a bucket name and choose the AWS Region where the bucket will reside. After you create a bucket, you cannot change the name of the bucket or its Region. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bucket names must follow the bucket naming rules i.e, Bucket name should be unique and having small case letters only. You can also configure a bucket to use S3 Versioning or other storage management features.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each object has three main components; the object’s content, the object’s unique identifier, and the object’s metadata (including its name, size, URL).&lt;/p&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%2F36t05giw7ogogye6rfm3.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%2F36t05giw7ogogye6rfm3.png" alt="Image description" width="800" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Object cannot be independent, it must exist within a bucket. There can be hundreds of buckets in each Amazon account and within each bucket, there can be hundreds of objects. 
&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%2F3vw361smfz232ugjb7pr.png" alt="Image description" width="355" height="294"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bucket creation process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create a bucket, give a unique bucket name. If ACL is disabled, enable it. Untick "Block all public access".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Leave other things as default and create.&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%2Fc2vl192xs5iqbttfe75p.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%2Fc2vl192xs5iqbttfe75p.png" alt="Image description" width="800" height="124"&gt;&lt;/a&gt;&lt;/p&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%2Ftc8uaqsevl49bcvan3iv.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%2Ftc8uaqsevl49bcvan3iv.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fhrp1kjlw1lrwpg63l1vb.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%2Fhrp1kjlw1lrwpg63l1vb.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fa1ijjrr6w0or7j8yh3rd.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%2Fa1ijjrr6w0or7j8yh3rd.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Upload an Object in the bucket. Select a file from your local directory and upload it.
&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%2Ftf067j8e2chr7pqd8366.png" alt="Image description" width="800" height="450"&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%2Fe7qdipfut7whet82atyg.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%2Fe7qdipfut7whet82atyg.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fejbs6reqasnjfj6psqdx.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%2Fejbs6reqasnjfj6psqdx.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mapping of S3 bucket object using TNT drive&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the bucket, click on object actions dropdown and select make public using ACL. So that the object will 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%2Fo4fi48gp1vr3htsc1cmx.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%2Fo4fi48gp1vr3htsc1cmx.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Now download TNT drive in order to mount S3 bucket in our local server. Now add account in TNT drive. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to IAM and create a user with S3 full access.&lt;/p&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%2F5xd2kz7h7oadqlhlopri.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%2F5xd2kz7h7oadqlhlopri.png" alt="Image description" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IAM user creation from AWS console.&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%2Fi6hqydx871bb0vxq9f0w.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%2Fi6hqydx871bb0vxq9f0w.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Ftotwys01mq465x4vizj7.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%2Ftotwys01mq465x4vizj7.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fs5n3icrrcz6ocs37smfi.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%2Fs5n3icrrcz6ocs37smfi.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now in TNT click add a account. Create account with access key and secret key ID for your IAM user created.&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%2Fhepfubzlpi6npnt7rlvs.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%2Fhepfubzlpi6npnt7rlvs.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now select "add a new mapped drive" in TNT drive. Browse for the S3 bucket you created and select your bucket. Click on add a new drive.
&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%2Fkmgbh6pqu9j78ietlx3d.png" alt="Image description" width="800" height="450"&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%2Fi2qqgv30wcl35gz5lruk.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%2Fi2qqgv30wcl35gz5lruk.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to my PC, find the mapped drive and see if the object is listed inside the bucket directory.( We can see that the object will be present inside the mapped drive).&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%2F45fpnxpffzskwnanlvus.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%2F45fpnxpffzskwnanlvus.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now add a text file in the local folder for your bucket and save  it. Now you can the same changes updated in AWS S3 console. That means in S3 bucket, you'll be having two objects.&lt;br&gt;
Hence, we can also mount S3 objects as network drives also.&lt;/p&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%2Fudx5fn0go5u7o2uyfh9r.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%2Fudx5fn0go5u7o2uyfh9r.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2F4unp0i4lq95yrdzl6amf.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%2F4unp0i4lq95yrdzl6amf.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the upcoming blogs we'll see how to host a static website using S3, S3 versioning and different storage classes of S3.&lt;br&gt;
Stay tuned. :)&lt;/p&gt;

&lt;p&gt;Thank You!!!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>s3</category>
      <category>s3bucket</category>
      <category>cloud</category>
    </item>
    <item>
      <title>AWS IAM</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Thu, 30 Jun 2022 05:23:03 +0000</pubDate>
      <link>https://dev.to/atm_06/aws-iam-4m9g</link>
      <guid>https://dev.to/atm_06/aws-iam-4m9g</guid>
      <description>&lt;h2&gt;
  
  
  AWS Identity and Access Management (IAM)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is IAM?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;IAM stands for Identity and Access Management.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Identity and Access Management (IAM) enables you to manage access to AWS services and resources securely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM is a web services that enable you to manage users and group &lt;br&gt;
permissions in AWS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM gives you the flexibility to configure access based on your company’s specific operational and security needs. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is targeted at organizations with multiple users or systems that use AWS products such as Amazon Elastic Compute Cloud, Amazon Relational Database Service, and the AWS Management Console.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You do this by using a combination of IAM features, which are explored in detail in this lesson:&lt;br&gt;
• IAM users, groups, and roles&lt;br&gt;
• IAM policies&lt;br&gt;
• Multi-factor authentication.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why we go for IAM?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;To avoid a security and logistical headache.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you create an AWS account, it has permissions to do &lt;br&gt;
anything and everything with all the resources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM Allows you to limit access as needed and gives you the &lt;br&gt;
peace of mind that approved people are accessing the right &lt;br&gt;
resources in the desired manner.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM will allow us to create multiple users with individual security credentials and permissions, with this IAM, each user is allowed to do only what they need to do.&lt;/p&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%2F6av8nueraa9fugo7g0fr.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%2F6av8nueraa9fugo7g0fr.PNG" alt="IAM users given different services permission" width="572" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each user in the AWS account must have a unique set of credentials to access the console. Different types of users have different set of permission.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Administrators need to access all AWS resources&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%2Fhx9iu83qtt6hjjcw7we3.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%2Fhx9iu83qtt6hjjcw7we3.png" alt="Image description" width="586" height="228"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Developers need only access on Amazon Elastic Compute Cloud (EC2)&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%2Fw3ifp767npq1v9j0qru4.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%2Fw3ifp767npq1v9j0qru4.png" alt="Image description" width="526" height="229"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We can use IAM to create a unique user for each employee and define their permissions.&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%2Fsbk2x524pe67fvxr4849.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%2Fsbk2x524pe67fvxr4849.png" alt="Image description" width="722" height="289"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AWS Root user and IAM user&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;*&lt;em&gt;AWS Account Root User *&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you first create an AWS account, you begin with an identity known as the root user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The root user is accessed by signing in with the email address and password that you used to create your AWS account. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can think of the root user as being similar to the owner of the coffee shop. It has complete access to all the AWS services and resources in the account.&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%2Fvo753knhu29ropi3ko5r.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%2Fvo753knhu29ropi3ko5r.png" alt="Image description" width="687" height="279"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best practices&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Do not use the root user for everyday tasks. Instead, use the root user to create your first IAM user and assign it permissions to create other users.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then, continue to create other IAM users, and access those identities for performing regular tasks throughout AWS. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Only use the root user when you need to perform a limited number of tasks that are only available to the root user. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Examples of these tasks include changing your root user email address and changing your AWS support plan.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;IAM users&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An IAM user is an identity that you create in AWS. It represents the person or application that interacts with AWS services and resources. It consists of a name and credentials.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;By default, when you create a new IAM user in AWS, it has no permissions associated with it. To allow the IAM user to perform specific actions in AWS, such as launching an Amazon EC2 instance or creating an Amazon S3 bucket, you must grant the IAM user the necessary permissions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best practice:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You should create individual IAM users for each person who needs to access AWS. Even if you have multiple employees who require the same level of access, you should create individual IAM users for each of them. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;This provides additional security by allowing each IAM user to have a unique set of security credentials.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM user Creation:&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%2F0n3nkq8wvlzdta6trdrq.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%2F0n3nkq8wvlzdta6trdrq.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&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%2Fh8r53c4ppnrnchrpb1tg.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%2Fh8r53c4ppnrnchrpb1tg.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fzrqgcs5z72pc850ypk46.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%2Fzrqgcs5z72pc850ypk46.png" alt="Image description" width="800" height="450"&gt;&lt;/a&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%2Fk07k1wf6txl51adqx4ey.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%2Fk07k1wf6txl51adqx4ey.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IAM policies&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An IAM policy is a document that allows or denies permissions to AWS services and resources. &lt;/li&gt;
&lt;li&gt;IAM policies enable you to customize users’ levels of access to resources. For example, you can allow users to access all of the Amazon S3 buckets within your AWS account, or only a specific bucket.&lt;/li&gt;
&lt;li&gt;By having IAM policies, you help to prevent users or roles from having more permissions than needed to perform their tasks.&lt;/li&gt;
&lt;li&gt;For example, if an employee needs access to only a specific bucket, specify the bucket in the IAM policy. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;We do this instead of granting the employee access to all of the buckets in your AWS account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here’s an example of how IAM policies work. Suppose that the coffee shop owner has to create an IAM user for a newly hired cashier. The cashier needs access to the receipts kept in an Amazon S3 bucket &lt;br&gt;
The below image represents an IAM policy writyten in json format.&lt;/p&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%2F2sqx63416quxh5nl5lfu.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%2F2sqx63416quxh5nl5lfu.png" alt="Sample IAM policy" width="800" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In this example, the IAM policy is allowing a specific action within Amazon S3: ListObject. The policy also mentions a specific bucket ID: maven-repo-tutorial.asimi.net. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the owner attaches this policy to the cashier’s IAM user, it will allow the cashier to view all of the objects in the maven-repo-tutorial.asimi.net bucket.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the owner wants the cashier to be able to access other services and perform other actions in AWS, the owner must attach additional policies to specify these services and actions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now, suppose that the coffee shop has hired a few more cashiers. Instead of assigning permissions to each individual IAM user, the owner places the users into an IAM group.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;IAM Groups&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We can create IAM groups for smilar type of sevices like EC2 and S3. We can add custom policies for the group.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Policies will be applied to every user associated in the group, so we don't have to assign policies to each user manually.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An IAM group is a collection of IAM users. When you assign an IAM policy to a group, all users in the group are granted permissions specified by the policy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here’s an example of how this might work in the coffee shop. Instead of assigning permissions to cashiers one at a time, the owner can create a “Cashiers” IAM group. The owner can then add IAM users to the group and then attach permissions at the group level.&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%2Fzaxusmtrew1ef53uxluv.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%2Fzaxusmtrew1ef53uxluv.png" alt="Image description" width="594" height="484"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Below pictures include the creation process of an IAM user group in AWS console.&lt;/p&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%2Fsqhzcaioa9f73z0f2y9s.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%2Fsqhzcaioa9f73z0f2y9s.png" alt="Image description" width="800" height="450"&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%2Fu6meqk9bdobqzxzm4n14.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%2Fu6meqk9bdobqzxzm4n14.png" alt="Image description" width="800" height="450"&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%2F84hpm0fbqacwszeexwbn.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%2F84hpm0fbqacwszeexwbn.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Assigning IAM policies at the group level also makes it easier to adjust permissions when an employee transfers to a different job. &lt;/li&gt;
&lt;li&gt;For example, if a cashier becomes an inventory specialist, the coffee shop owner removes them from the “Cashiers” IAM group and adds them into the “Inventory Specialists” IAM group. This ensures that employees have only the permissions that are required for their current role.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;IAM Roles&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Using IAM roles we can attach S3 and EC2 with each other(kind of pipelining), in this case we don't have to use ID and Password.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An IAM role is an identity that you can assume to gain temporary access to permissions. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Before an IAM user, application, or service can assume an IAM role, they must be granted permissions to switch to the role. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When someone assumes an IAM role, they abandon all previous permissions that they had under a previous role and assume the permissions of the new role.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM roles are ideal for situations in which access to services or resources needs to be granted temporarily, instead of long-term.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example of IAM Roles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An example of how IAM roles could be used in the coffee shop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;First, the owner grants the employee permissions to switch to a role for each workstation in the coffee shop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next, the employee begins their day by assuming the “Cashier” role. This grants them access to the cash register system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Later in the day, the employee needs to update the inventory system. They assume the “Inventory” role. This grants the employee access to the inventory system and also revokes their access to the cash register system.&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%2F8rsl809wp6iz542tl15r.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%2F8rsl809wp6iz542tl15r.png" alt="Image description" width="606" height="416"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Multi-factor Authentication&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When you sign in to Gmail(say) it requires you to provide multiple pieces of information to verify your identity. Such as you might have needed to provide your password and then a second form of authentication, such as a random code sent to your phone. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This is an example of multi-factor authentication. In IAM, multi-factor authentication (MFA) provides an extra layer of security for your AWS account. This is also called as Hardening of AWS account.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;ON IAM dashboard click on activate MFA.&lt;/li&gt;
&lt;li&gt;Then click on virtual MFA device. We use an authenticator app in our cell phone as MFA device to scan the QR code and to activate MFA.&lt;/li&gt;
&lt;li&gt;After scanning the QR code via authenticator app we get MAF1 and MFA2 codes.&lt;/li&gt;
&lt;li&gt;On next login for every user they'll have to undergo MFA authentication.&lt;/li&gt;
&lt;li&gt;We can also activate MFA via AWS CLI. But we have to provide access key and secret key in this case. So it's better not to go ahead with this step as anyone can access our ervices if they get the keys.&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%2F1gn2fc3gjvy68ud119s6.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%2F1gn2fc3gjvy68ud119s6.png" alt="Image description" width="800" height="450"&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%2Fo3h0h27044yzyp1ie5aw.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%2Fo3h0h27044yzyp1ie5aw.png" alt="Image description" width="800" height="450"&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%2Flhbdklqhd9vr2clo5c1r.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%2Flhbdklqhd9vr2clo5c1r.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you !!&lt;br&gt;
Follow me for more detailed contents on AWS services :)&lt;/p&gt;

</description>
      <category>aws</category>
      <category>iam</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Website Hosting on Ec2 instance with SSL enabled using an Application Load Balancer and Route53.</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Tue, 28 Jun 2022 03:56:04 +0000</pubDate>
      <link>https://dev.to/atm_06/website-hosting-on-ec2-instance-with-ssl-enabled-using-an-application-load-balancer-and-route53-4dpj</link>
      <guid>https://dev.to/atm_06/website-hosting-on-ec2-instance-with-ssl-enabled-using-an-application-load-balancer-and-route53-4dpj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Amazon EC2:&lt;/strong&gt; The Amazon Elastic Compute Cloud is a web service that helps you to run virtual machines in the cloud by configuring its capacity, security, and networking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EC2 instance:&lt;/strong&gt; A virtual server on Amazon’s Elastic Compute Cloud (EC2) to run your business software.&lt;/p&gt;

&lt;p&gt;Create an EC2 instance and install a web server&lt;br&gt;
First, you create an EC2 instance in the public subnet of your VPC. [Here we used a default public subnet and default VPC].&lt;/p&gt;

&lt;p&gt;Choose EC2 Dashboard, and then choose Launch instance,&lt;br&gt;
Choose the Amazon Linux 2 AMI.&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%2Fz872m48m42wdb8nv20sl.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%2Fz872m48m42wdb8nv20sl.png" alt="Image description" width="800" height="118"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose the t2.micro instance type, as shown following, and then choose Next: Configure Instance Details.&lt;br&gt;
On the Configure Instance Details page : You can select number of instances you need and Go with Your Default setup or [Choose you VPC if you created].&lt;br&gt;
Choose Next: Add Storage.&lt;br&gt;
On the Add Storage page, keep the default values and choose&lt;/p&gt;

&lt;p&gt;Next: Add Tags.&lt;/p&gt;

&lt;p&gt;Choose Next: Configure Security Group.&lt;/p&gt;

&lt;p&gt;On the Configure Security Group page, shown following, choose Select an existing security group.&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%2Fod74nlotupuunh8okz3a.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%2Fod74nlotupuunh8okz3a.png" alt="Image description" width="800" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose Review and Launch.&lt;br&gt;
On the Select an existing key pair or create a new key pair&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%2Fmw6azvjgikd08jmkt0ds.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%2Fmw6azvjgikd08jmkt0ds.png" alt="Image description" width="800" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To launch your EC2 instance, choose Launch Instances.&lt;br&gt;
Name those server as&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%2F1ek2nbipfwvzz4srxu7n.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%2F1ek2nbipfwvzz4srxu7n.png" alt="Image description" width="800" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now connect these servers with xshell and so to root user.&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%2Fnlln9bb2a8nxh1hvw7h9.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%2Fnlln9bb2a8nxh1hvw7h9.png" alt="Image description" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;sudo su , cd [command for root user]&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%2Fynlgsi6t60t1ikrc4h3k.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%2Fynlgsi6t60t1ikrc4h3k.png" alt="Image description" width="637" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In-order to host a website in ec2 , First you need to download web server [ Here we are going to install apache server ].&lt;br&gt;
yum install httpd , type yes if required&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%2F6eh9qrg2r2crlsqwtyjm.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%2F6eh9qrg2r2crlsqwtyjm.png" alt="Image description" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can use Github commands to clone our website code from our repo , so You need to install git. yum install git -y&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%2Ftvi1x7knocbgvftai23s.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%2Ftvi1x7knocbgvftai23s.png" alt="Image description" width="800" height="92"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we have to clone that repo to our web server folder name [ html ] as follow&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%2F6eq4l66hakx1kwpbhtzb.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%2F6eq4l66hakx1kwpbhtzb.png" alt="Image description" width="800" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;cd /var/www/html [ path ].&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%2F7uwrnfdnx7dbvgjze2wo.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%2F7uwrnfdnx7dbvgjze2wo.png" alt="Image description" width="603" height="93"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need to start Apache Server using command below&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%2F7f0s6hllnkfaueupqtot.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%2F7f0s6hllnkfaueupqtot.png" alt="Image description" width="800" height="65"&gt;&lt;/a&gt;&lt;br&gt;
 [In case if we stop and start our server , we need start our apache again , to avoid this we can simply enable that server]&lt;br&gt;
Continue this process with 3 server [You can use single or multiple server ]&lt;br&gt;
Paste public IP to browser , You can able to see your website&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%2F1ba8pwisamixqzntam0y.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%2F1ba8pwisamixqzntam0y.png" alt="Image description" width="781" height="33"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some other ways to upload your website&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use s3 bucket to upload your website and using IAM we can access to this or using WinSCP application you can simply copy paste your code to that folder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a load balancer ?&lt;/strong&gt;&lt;br&gt;
A load balancer serves as the single point of contact for clients. The load balancer distributes incoming application traffic across multiple targets, such as EC2 instances, in multiple Availability Zones.&lt;/p&gt;

&lt;p&gt;This increases the availability of your application. You add one or more listeners to your load balancer.&lt;/p&gt;

&lt;p&gt;A listener checks for connection requests from clients, using the protocol and port that you configure. The rules that you define for a listener determine how the load balancer routes requests to its registered targets.&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%2Fojexcti0fgtpswg0kydy.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%2Fojexcti0fgtpswg0kydy.png" alt="Image description" width="555" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each target group routes requests to one or more registered targets, such as EC2 instances, using the protocol and port number that you specify.&lt;/p&gt;

&lt;p&gt;Elastic Load Balancing supports the following load balancers: Application Load Balancers, Network Load Balancers, Gateway Load Balancers, and Classic Load Balancers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Load Balancer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Search for load balancer and click on create.&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%2Focxm3xxkxvu0am4eccgz.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%2Focxm3xxkxvu0am4eccgz.png" alt="Image description" width="800" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select Application load balancer.&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%2Fpqdt7j5gp703jfxb1cap.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%2Fpqdt7j5gp703jfxb1cap.png" alt="Image description" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Name it as follow&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%2Fz5mrei3mxb72dcars4en.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%2Fz5mrei3mxb72dcars4en.png" alt="Image description" width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select VPC and subnet&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%2Fhtdf2qgh38t7nxga6vzi.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%2Fhtdf2qgh38t7nxga6vzi.png" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a Security group enable ssh,http,https.&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%2Fmny03tabmxr7f28hkzc9.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%2Fmny03tabmxr7f28hkzc9.png" alt="Image description" width="800" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the navigation pane, under Load Balancing, choose Target Groups.&lt;br&gt;
Choose Create target group.&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%2F5m8y219yu9177umdg7za.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%2F5m8y219yu9177umdg7za.png" alt="Image description" width="800" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Under Basic configuration, keep the Target type as instance.&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%2F4euesib015r7b7pamo3e.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%2F4euesib015r7b7pamo3e.png" alt="Image description" width="800" height="550"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For Target group name, enter a name for the new target group.&lt;br&gt;
Keep the default protocol (HTTP) and port (80).&lt;br&gt;
Select the VPC containing your instances. Keep the protocol version as HTTP1.&lt;br&gt;
For Health checks, keep the default settings.&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%2Fjcdqexmnesonu3zyqx6n.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%2Fjcdqexmnesonu3zyqx6n.png" alt="Image description" width="800" height="537"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose Next.&lt;/p&gt;

&lt;p&gt;On the Register targets page, complete the following steps. This is an optional step for creating the load balancer. However, you must register this target if you want to test your load balancer and ensure that it is routing traffic to this target.&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%2Fptneczdhfet4cfe9o7nz.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%2Fptneczdhfet4cfe9o7nz.png" alt="Image description" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For Available instances, select one or more instances.&lt;br&gt;
Keep the default port 80, and choose Include as pending below.&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%2Fhcwhr7nvkl35xfkgfanx.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%2Fhcwhr7nvkl35xfkgfanx.png" alt="Image description" width="800" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose Create target group&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%2Fruyxb022y4q4fftparo1.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%2Fruyxb022y4q4fftparo1.png" alt="Image description" width="800" height="218"&gt;&lt;/a&gt; &lt;br&gt;
Leave default setup&lt;br&gt;
Create load balancer&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%2F69d372zuak1ljolgxggy.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%2F69d372zuak1ljolgxggy.png" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Paste that DNS name of your load balancer in browser you can see your website.&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%2Fvcytqavoy9w446ku7ied.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%2Fvcytqavoy9w446ku7ied.png" alt="Image description" width="800" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to attach a domain name&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;you require a free or purchased domain to fully complete all the steps. If you already have a domain, then awesome, if not, don't worry, you can get a free domain! You can visit the following site and get yourself a free domain. &lt;br&gt;
&lt;a href="https://www.freenom.com/en/index.html?lang=en"&gt;https://www.freenom.com/en/index.html?lang=en&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%2Fc9f4fas3sllgmu9545m7.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%2Fc9f4fas3sllgmu9545m7.png" alt="Image description" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you sort out your domain, you should go back to the AWS console and navigate to the “Route 53” service. You should then navigate to “Hosted zones” and create a new hosted zone.&lt;br&gt;
Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service. You can use Route 53 to perform three main functions in any combination: domain registration, DNS routing, and health checking.&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%2Fzsgsy3yzpj8427gocdrg.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%2Fzsgsy3yzpj8427gocdrg.png" alt="Image description" width="800" height="398"&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%2Fr0xa6b7xor2jphcci6dk.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%2Fr0xa6b7xor2jphcci6dk.png" alt="Image description" width="775" height="122"&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%2Fj82f3ogthb2y7czn4jss.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%2Fj82f3ogthb2y7czn4jss.png" alt="Image description" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You have to make sure to enter the exact domain name and select “Public hosted zone” for the type when creating the new hosted zone.&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%2F8seiij49dout6jrca7xr.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%2F8seiij49dout6jrca7xr.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have created the hosted zone, it should contain two records, NS (Name Server) record and SOA (Start Of Authority) record. You will need to use the NS record in the next step!&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%2Fkqxegb9f67lluizxt3nk.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%2Fkqxegb9f67lluizxt3nk.png" alt="Image description" width="800" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, you should head over to the admin panel of your domain provider, in my case it is freenom.com. You should find the section which enables you to configure the name servers for the domain! For different domain providers, this would look a bit different!&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%2Fw87hxmfcpu9os3g0mg35.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%2Fw87hxmfcpu9os3g0mg35.png" alt="Image description" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_- You should be aware that sometimes Nameservers takes a couple of hours to Sync in. So if your domain doesn't work at the end of this article, be patient and try again in a few hours _&lt;/p&gt;

&lt;p&gt;You can also create record name , record type , record traffic&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%2Frcltvio9km39dx4a18c4.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%2Frcltvio9km39dx4a18c4.png" alt="Image description" width="800" height="352"&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%2F616ccxdu58f9to0cry5p.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%2F616ccxdu58f9to0cry5p.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that you can type &lt;a href="http://www.yourDomainName.ml"&gt;www.yourDomainName.ml&lt;/a&gt; in browser , But its not secured , to make it secured we need to attach a SSL to it.&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%2F7xyk8krnqmky8tn8g5cw.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%2F7xyk8krnqmky8tn8g5cw.png" alt="Image description" width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to attach a SSL to our domain&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AWS Certificate Manager is a service that lets you easily provision, manage, and deploy public and private Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services and your internal connected resources&lt;/p&gt;

&lt;p&gt;Search for Certificate Manager&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%2Ffqd8r64gluxfk86a36bn.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%2Ffqd8r64gluxfk86a36bn.png" alt="Image description" width="800" height="113"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Request a public certificate&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%2F2tnj92fllkes3f6sdmhn.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%2F2tnj92fllkes3f6sdmhn.png" alt="Image description" width="800" height="298"&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%2Ft1s44hsublgnksmuqqol.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%2Ft1s44hsublgnksmuqqol.png" alt="Image description" width="800" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter your domain name you can use * before your domain name for host based routing.&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%2Fe05dt9gr98f9vmdfyw07.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%2Fe05dt9gr98f9vmdfyw07.png" alt="Image description" width="800" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on certificate and create records&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%2Fn6k5sbubuvne2nv9t7an.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%2Fn6k5sbubuvne2nv9t7an.png" alt="Image description" width="800" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create DNS records in Amazon Route 53.&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%2Fvpkla5inylclsert3fn4.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%2Fvpkla5inylclsert3fn4.png" alt="Image description" width="800" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A CNAME record is added to your record&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%2F8tkpbswyk5hz94vlqvxq.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%2F8tkpbswyk5hz94vlqvxq.png" alt="Image description" width="800" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that go to load balancer .. Click listener and Add Listener.&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%2F8kvmc0dfkmxno6rg46sn.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%2F8kvmc0dfkmxno6rg46sn.png" alt="Image description" width="800" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add HTTPS Protocol 443 port , Select the target group .&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%2Fmdhhntwxa7wwvgxjvh5k.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%2Fmdhhntwxa7wwvgxjvh5k.png" alt="Image description" width="800" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In default SSL certificate part :- Add the certificate [ That certificate you have created in Certificate Manager ]&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%2Fj8dgc9mal4ndlll0438x.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%2Fj8dgc9mal4ndlll0438x.png" alt="Image description" width="800" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Edit the HTTP part Click on add condition select Host add &lt;a href="http://www.domanname.ml"&gt;www.domanname.ml&lt;/a&gt; and redirect to HTTPS 443 port [save it] add domanname.ml and redirect to HTTPS 443 port [save it]&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%2Ftkve3b7fykjtmsv1xfth.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%2Ftkve3b7fykjtmsv1xfth.png" alt="Image description" width="800" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it will be redirect to HTTPS protocol,&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%2Fudor1275hosb3kjrbb7f.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%2Fudor1275hosb3kjrbb7f.png" alt="Image description" width="458" height="47"&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%2Fvfnot1ndq45fmlzq44su.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%2Fvfnot1ndq45fmlzq44su.png" alt="Image description" width="562" height="36"&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%2F971m4t2a5lk3fykya5xr.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%2F971m4t2a5lk3fykya5xr.png" alt="Image description" width="282" height="32"&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%2Fprovzbqx6k33b7d3yw14.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%2Fprovzbqx6k33b7d3yw14.png" alt="Image description" width="800" height="402"&gt;&lt;/a&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%2Faq5cmww2heold53h7mvp.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%2Faq5cmww2heold53h7mvp.png" alt="Image description" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Connection Draining&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
When Connection Draining is enabled and configured, the process of deregistering an instance from an Elastic Load Balancer gains an additional step. For the duration of the configured timeout, the load balancer will allow existing, in-flight requests made to an instance to complete, but it will not send any new requests to the instance. During this time, the API will report the status of the instance as in Service, along with a message stating that “Instance deregistration currently in progress.” Once the timeout is reached, any remaining connections will be forcibly closed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stickyness&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Suppose two separate web browsers each request three separate web pages in turn. Each request can go to any of the EC2 instances behind the load balancer, like this:&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%2Fo0maysa0b3rn6xu1soj8.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%2Fo0maysa0b3rn6xu1soj8.png" alt="Image description" width="415" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When a particular request reaches a given EC2 instance, the instance must retrieve information about the user from state data that must be stored globally. There’s no opportunity for the instance to cache any data since the odds that several requests from the same user / browser will go down as more instances are added to the load balancer.&lt;br&gt;
With the new sticky session feature, it is possible to instruct the load balancer to route repeated requests to the same EC2 instance whenever possible.&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%2Fozb7gclcls2jx8zmlcdy.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%2Fozb7gclcls2jx8zmlcdy.png" alt="Image description" width="415" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this case, the instances can cache user data locally for better performance.&lt;br&gt;
A series of requests from the user will be routed to the same EC2 instance if possible.&lt;br&gt;
If the instance has been terminated or has failed a recent health check, the load balancer will route the request to another instance.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloudcomputing</category>
      <category>aec2</category>
      <category>route53</category>
    </item>
    <item>
      <title>IP addressing</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Sat, 09 Apr 2022 03:24:50 +0000</pubDate>
      <link>https://dev.to/atm_06/ip-addressing-16ai</link>
      <guid>https://dev.to/atm_06/ip-addressing-16ai</guid>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What is Ip address?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IP address or internet protocol address is an unique number assigned to a server when it's connected to the internet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Basically your internet service provider (ISP) will assign a geologically identifiable number when you connect to Internet.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Purpose of Ip address&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ip address is the unique identity off a server.
-Each domain like "Apple.com" is bounded with an ip address.&lt;/li&gt;
&lt;li&gt;Let's say we bind "apple.com" domain with ip address of the server where application is deployed. Hence, when a user will hit the domain name, they can directly navigate to the particular website.&lt;/li&gt;
&lt;li&gt; Most of the larger websites like Apple has it’s own IP address like 17.172.224.47. You can enter this IP address directly on the browser’s address bar to resolve the domain name of the site.&lt;/li&gt;
&lt;li&gt;Smaller websites may share single server address amongst hundreds of other websites.&lt;/li&gt;
&lt;li&gt;On the other hand, the websites and apps also can track your details based on your IP address. &lt;/li&gt;
&lt;li&gt;Let us take the same example of accessing Apple’s website. When you open the site from China, it will automatically redirects to the Chinese version applce.com/cn/ instead of the English version apple.com.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Types of ip address&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When we launch a server, it has two ip address : public ip and private ip address.
-Public ip is unique for the particular server only when the server is running.&lt;/li&gt;
&lt;li&gt;By using public ip, we can connect to the servers even if we are outside of the network where the server is deployed.&lt;/li&gt;
&lt;li&gt;But private ip is only accessible within the same network where the server is deployed.&lt;/li&gt;
&lt;li&gt;For a database, only private ip is assigned to it. That means only internal resources of that network will be able to communicate and access the server.&lt;/li&gt;
&lt;li&gt;Hence, by using private ip for the servers, we restrict access to the servers and allow specified users only.&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%2F83n0sg76yykymx7tkuso.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%2F83n0sg76yykymx7tkuso.png" alt="public and private ip" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an instance "Web-1" and note down its public ip address. If we reboot the instance, we can see that the public ip remains unchanged.&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%2Ftgbn1fegruk2ulvay8nt.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%2Ftgbn1fegruk2ulvay8nt.png" alt="rebooting instance-1" width="800" height="450"&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%2F3gnopr28dmrh0sew9p2n.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%2F3gnopr28dmrh0sew9p2n.png" alt="rebooting instance-2" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If we stop the instance it'll have only private ip address and again if we restart the instance then we'll see that the public ip of the instance gets changed.&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%2Fp86xwcn62hecgabvn6ez.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%2Fp86xwcn62hecgabvn6ez.png" alt="stopping instance-1" width="800" height="450"&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%2Fiklq4zx4jkhzrrae0ozm.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%2Fiklq4zx4jkhzrrae0ozm.png" alt="stopping instance-2" width="800" height="450"&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%2Frbl5gi38r1e32l7danmh.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%2Frbl5gi38r1e32l7danmh.png" alt="public ip gets changed after rebooting" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A public IP address or primary address represents the whole network of devices associated with it. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;Every device included within with your primary address contains their own private IP address. ISP is responsible to provide your public IP address to your router.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Public IP addresses are further classified into two categories- dynamic and static.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;Dynamic IP addresses&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As the name suggests, Dynamic IP addresses change automatically and frequently. With this types of IP address, ISPs already purchase a bulk stock of IP addresses and allocate them in some order to their customers. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;Static IP addresses&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In comparison to dynamic IP addresses, static addresses are constant in nature. &lt;/li&gt;
&lt;li&gt;The network assigns the IP address to the device only once and, it remains consistent. &lt;/li&gt;
&lt;li&gt;Though most firms or individuals do not prefer to have a static IP address, it is essential to have a static IP address for an organization that wants to host its network server. &lt;/li&gt;
&lt;li&gt;It protects websites and email addresses linked with it with a constant IP address.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Elastic Ip address&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Elastic IP addresses are most commonly used to help with fault-tolerant instances or software. &lt;/li&gt;
&lt;li&gt;For example, if you have an EC2 instance that has an Elastic IP address and that instance is stopped or terminated, you can remap the address and re-associate it with another instance in your account.&lt;/li&gt;
&lt;li&gt;On termination or rebooting the public ip of instance remains fixed if the instance is associated with an elastic ip address.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS provides 5 elastic ip in a single region.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let's configure elastic ip setup :&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Launch an instance and allocate an elastic ip to it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mark the public ip of the elastic ip.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Associate the elastic ip with the running instance (Web-1).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now try stopping and restarting the instance and check that the public ip remains unchanged.&lt;/p&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%2Fib8lqqkrqs8aop58xtd2.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%2Fib8lqqkrqs8aop58xtd2.png" alt="el-ip-1" width="800" height="480"&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%2Fuwdwqhhn2m0cmq1wef10.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%2Fuwdwqhhn2m0cmq1wef10.png" alt="el-ip-2" width="800" height="450"&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%2F41gronbudprtjdn2tt4w.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%2F41gronbudprtjdn2tt4w.png" alt="el-ip-3" width="800" height="450"&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%2Fttb0h2n1qjx4x2weet5k.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%2Fttb0h2n1qjx4x2weet5k.png" alt="el-ip-4" width="800" height="450"&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%2F44jokwvqegypclk1xlk8.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%2F44jokwvqegypclk1xlk8.png" alt="el-5" width="800" height="450"&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%2Fqfu0p1dlboiu300nxamk.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%2Fqfu0p1dlboiu300nxamk.png" alt="el-ip-6" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IPV4 and IPV6&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An IPv4 address (Internet Protocol version 4) comprises four sets of numbers, each ranging from 0 to 255, which are separated by periods. For example, a site's IP address is 104.103.88.45. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;IPv4 is the current standard for IP addresses in the TCP/IP model, while IPv6 is a newer IP version on the rise.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Internet Protocol version 6, or IPv6, was first introduced in the late 1990s as a replacement for IPv4. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It uses 128-bit addresses formatted as eight groups of four hexadecimal numbers separated by colons. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IPv6 is the solution that addresses the relatively limited number of IP addresses possible under IPv4. Under IPv6, there will no longer be a shortage of the total number of possible addresses.&lt;/p&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%2Feifrhbyox0ijlqmxtq0z.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%2Feifrhbyox0ijlqmxtq0z.png" alt="IPV4 vs IPV6" width="263" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloudcomputing</category>
      <category>ipaddresing</category>
      <category>ipv4ipv6</category>
    </item>
    <item>
      <title>AWS EFS (Elastic File Storage)</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Sun, 27 Mar 2022 05:42:50 +0000</pubDate>
      <link>https://dev.to/atm_06/aws-efs-elastic-file-storage-1b60</link>
      <guid>https://dev.to/atm_06/aws-efs-elastic-file-storage-1b60</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is EFS?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon EFS provides scalable file storage for use with Amazon EC2. You can create an EFS file system and configure your instances to mount the file system. &lt;/li&gt;
&lt;li&gt;You can use an EFS file system as a common data
source for workloads and applications running on multiple instances.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Instance store lifetime&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can specify instance store volumes for an instance only when you launch it. You can't detach an instance store volume from one instance and attach it to a different instance.&lt;/li&gt;
&lt;li&gt;The data in an instance store persists only during the lifetime of its associated instance. &lt;/li&gt;
&lt;li&gt;If an instance reboots, data in the instance store persists. However, data in the instance store is lost under any of the following circumstances:
• The underlying disk drive fails
• The instance stops
• The instance terminates
Therefore, we generally do not rely on instance store for valuable, long-term data. Instead, we use more durable data
storage, such as Amazon S3, Amazon EBS, or Amazon EFS. Here we'll discuss about features and implementation of EFS.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Characteristics of EFS volume&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In EFS, we mount the volume in multiple instances like a shared storage.&lt;/li&gt;
&lt;li&gt;EBS volume can only be mounted on AWS Ec2 whereas EFS can be mounted on AWS Ec2, Azure Vms, GCP vms and also on premises servers.&lt;/li&gt;
&lt;li&gt;EFS can be attached with servers irrespective of availability zones.&lt;/li&gt;
&lt;li&gt;For EFS, we don't have to define storage and aws only charges for the storage that's used i.e. EFS is synced with the data copied.&lt;/li&gt;
&lt;li&gt;Amazon EFS is a fully managed service for hosting Network File System (NFS) filesystems in the cloud.&lt;/li&gt;
&lt;li&gt;It is an implementation of a NFS file share and is accessed using the NFS protocol.&lt;/li&gt;
&lt;li&gt;It provides elastic storage capacity and pay for what you use (in contrast to Amazon EBS with which you pay for what you provision).&lt;/li&gt;
&lt;li&gt;You can configure mount-points in one, or many, AZs.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can mount an AWS EFS filesystem from on-premises systems ONLY if you are using AWS Direct Connect or a VPN connection.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Typical use cases include big data and analytics, media processing workflows, content management, web serving, home directories etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS EFS can scale up to petabytes. AWS EFS is elastic and grows and shrinks as you add and remove data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can concurrently connect up to thousands of Amazon EC2 instances, from multiple AZs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following diagram depicts the various options for mounting an EFS filesystem:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtj201gvz959mz1s8m6b.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtj201gvz959mz1s8m6b.jpeg" alt="Amazon EFS File System"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Need for EFS in AWS&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In EBS, we clubbed ebs volumes and mounted those volumes on a server. &lt;/li&gt;
&lt;li&gt;But to attach that same volume to another server/instance we have to first unmount the volume from server-1 and then attach vol. to server-2.&lt;/li&gt;
&lt;li&gt;Similarly for multiple servers, we can unmount and detach volume from one server and attach it to another.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;&lt;u&gt;On premises setup for EBS&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load balancers are used to distribute traffic into different servers so that each server can handle requests.&lt;/li&gt;
&lt;li&gt;Data from each server gets stored in the database, we've to give the database an endpoint. If we don't have an database, we can store the data locally.&lt;/li&gt;
&lt;li&gt;Such as let's consider an e-commerce app. If today you accessed the app and you get response from server-1. then your details will be stored in EBS volume of server-1.&lt;/li&gt;
&lt;li&gt;The next day if you access the app and you get response from server-2, then you can't see your details listed over there as server-2 has different EBS volume.&lt;/li&gt;
&lt;li&gt;To solve this issue we use EFS volume and mount it to multiple instances in order to make the app more user friendly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhqcojz6aqg864r57vwuj.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhqcojz6aqg864r57vwuj.jpeg" alt="EFS vs EBS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;On premises setup For EFS :&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fur79bj4edoddkqrmpyus.jpg" alt="On prem setup of EFS"&gt;
-First we establish a hardware rack and then mount hardware on it.&lt;/li&gt;
&lt;li&gt;Linux and NFS are configured on the servers.&lt;/li&gt;
&lt;li&gt;Then we attach the server to SAN storage by a LAN cable. &lt;/li&gt;
&lt;li&gt;NFS basically converts the physical volumes into logical volumes. So that we can attach the logical volumes into different servers. Changes in each server gets reflected on logical volumes.&lt;/li&gt;
&lt;li&gt;But, On premises setup is costly, so Aws provides these services as functionality of NFS using EFS.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;EFS VS EBS&lt;/strong&gt;&lt;br&gt;
We often get confused about EFS and EBS volumes and their characteristics. Here I've mentioned some basic and key differences between ebs and efs.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;EBS can be mounted on EC2 instances only. Whereas, EFS can be mounted on Virtual machine(VMs) of AZURE, Compute engines of GCP, and also with the on premises setup too.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For EBS, the instance attached with ebs should be in the same availability zone as that of the ebs vol. If not, then we've to create a snapshot of ebs in the same region as that of instance and attach it.&lt;br&gt;
But in case of EFS, the efs vol can be attached to instance irrespective of the availability zone specified.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If we use 10 GB of EBS volume, AWS charges us for the entire 10GB, even if all of it isn't utilized.&lt;br&gt;
But in EFS volume we don't specify the storage. Rather, it is synced with the data copied. Which means, if you use 1GB of data then you'll be charged for that 1GB only.&lt;br&gt;
So, EFS is cost effective than EBS.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

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

&lt;ul&gt;
&lt;li&gt;Launch an ec2 instance with security group configured to allow only your IP to ssh into the server.&lt;/li&gt;
&lt;li&gt;To mount EFS on server, we need to allow NFS port i.e, port 2049.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Now go to EFS on AWS console and  create a file system. For the network part click manage -&amp;gt; security groups -&amp;gt; select the security group you configured (say my-sg) and save the changes.&lt;/li&gt;
&lt;li&gt;Here you can choose any availability zone for your efs vol. configuration. (My instance is at ap-south-1a and I've configured my efs vol. at ap-south-1b).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpd62ejyt35qpfsvqf2es.png" alt="EFS config"&gt;
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;After configuring network part, click on attach -&amp;gt; mount via ip. Then copy the command to attach efs via nfs.&lt;/li&gt;
&lt;li&gt;Run the command in xshell&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdxuxsv1bah3l2qmabqy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdxuxsv1bah3l2qmabqy.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
-After mounting the volume create some files in the instance "my-server" by using touch command.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Similarly, if we create two instances (VM-1, and VM-2) and configure efs volume via NFS client following the above steps,
we've to connect both the instances separately and mount the efs volume by creating a folder (say mkdir  /efs1 or mkdir /efs2 respectively.)&lt;/li&gt;
&lt;li&gt;Now if we create some files on VM-1 by using touch command (say touch abc{1..100}) , these files will also be listed over VM-2 server as we're using the same EFS volume for both the servers.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Basically, we learned that in EFS, we can attach volume to multiple servers and if we make changes in one server, then the same changes are reflected on the other servers too.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>cloudcomputing</category>
      <category>efs</category>
    </item>
    <item>
      <title>Basics of Cloud Computing</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Fri, 11 Feb 2022 03:58:52 +0000</pubDate>
      <link>https://dev.to/atm_06/basics-of-cloud-computing-4po7</link>
      <guid>https://dev.to/atm_06/basics-of-cloud-computing-4po7</guid>
      <description>&lt;h2&gt;
  
  
  Cloud Computing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In 2006, Amazon Web Services (AWS) started to offer IT services to the market in the form of web services, which is nowadays known as cloud computing. &lt;/li&gt;
&lt;li&gt;With this cloud, we need not plan for servers and other IT infrastructure which takes up much of time in advance. Instead, these services can instantly spin up hundreds or thousands of servers in minutes and deliver results faster. &lt;/li&gt;
&lt;li&gt;We pay only for what we use with no up-front expenses and no long-term commitments, which makes AWS cost efficient.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Computing Models
&lt;/h2&gt;

&lt;h2&gt;
  
  
  1. Desktop Computing :
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In traditional desktop computing, each employee accesses business software from his or her own individual computer. Desktop applications like Microsoft Word or Adobe Acrobat are installed directly on employee computers and business applications are installed on back end servers.&lt;/li&gt;
&lt;li&gt;Main disadvantage of desktop computing is that it isn't remotely accessible.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Client-Server Computing model :
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In client server computing, the clients requests a resource and the server provides that resource. &lt;/li&gt;
&lt;li&gt;A server may serve multiple clients at the same time while a client is in contact with only one server. &lt;/li&gt;
&lt;li&gt;Both the client and server usually communicate via a computer network but sometimes they may communicate internally within the same network.
&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%2F5flm3ujtfgldcx7v98xd.PNG" alt="Client-server computing model" width="657" height="342"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Characteristics of Client Server Computing:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The client server computing works with a system of request and response. The client sends a request to the server and the server responds with the desired information.&lt;/li&gt;
&lt;li&gt;A server can only accommodate a limited number of client requests at a time. So it uses a system based to priority to respond to the requests.&lt;/li&gt;
&lt;li&gt;Denial of Service attacks hinders server ability to respond to authentic client requests by increasing the Cpu utilization of server with false requests.&lt;/li&gt;
&lt;li&gt;An example of a client server computing system is a web server. It returns the web pages to the clients that requested them. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Client Server Computing :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All the required data is concentrated in the server. So it is easy to protect the data and provide authorization and authentication.&lt;/li&gt;
&lt;li&gt;The server need not be located physically close to the clients. Yet the data can be accessed efficiently.&lt;/li&gt;
&lt;li&gt;It is easy to replace, upgrade or relocate the nodes in the client server model because all the nodes are independent and request data only from the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Disadvantages of Client Server Computing :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If all the clients simultaneously request data from the server, it may get overloaded. This may lead to latency in the network.&lt;/li&gt;
&lt;li&gt;If the server fails for any reason, then requests of the clients can't be fulfilled.&lt;/li&gt;
&lt;li&gt;The cost of setting and maintaining a client server model are quite high.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Cluster Computing :
&lt;/h2&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%2F8fi6uq1pip7csxaxnqi5.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%2F8fi6uq1pip7csxaxnqi5.png" alt="cluster computing" width="267" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cluster computing is a collection of tightly or loosely connected computers that work together so that they act as a single entity. &lt;/li&gt;
&lt;li&gt;The connected computers execute operations all together thus creating the idea of a single system. The clusters are generally connected through fast local area networks (LANs).&lt;/li&gt;
&lt;li&gt;Cluster computing gives a relatively inexpensive, unconventional to the large server or mainframe computer solutions.&lt;/li&gt;
&lt;li&gt;It resolves the demand for content criticality and process services in a faster way. Many organizations and IT companies are implementing cluster computing to augment their scalability, availability, processing speed and resource management at economic prices.
&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%2F0sercw5eo0lzki3cl5fl.png" alt="cluster computing model" width="577" height="322"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Load Balancing Clusters :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This Cluster distributes all the incoming traffic/requests for resources from nodes that run the same programs and machines.&lt;/li&gt;
&lt;li&gt;In this Cluster model, all the nodes are responsible for tracking orders, and if a node fails, then the requests are distributed amongst all the nodes available. Such a solution is usually used on web server farms.
&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%2F2ggfdyc0gylkob7dd64l.PNG" alt="Load Balancer Cluster" width="732" height="395"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;High Availability (HA) and Failover Clusters:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The basic idea in this form of Cluster is that if a node fails, then applications and services can be made available to other nodes. &lt;/li&gt;
&lt;li&gt;These types of Clusters serve as the base for critical missions, mails, files, and application servers.
&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%2Fhibm29ukhhwecqoa2bq4.png" alt="HA Cluster" width="800" height="565"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advantages of Cluster Computing :
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;High Performance :&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The systems offer better and enhanced performance than that of mainframe computer networks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Easy to manage :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cluster Computing is manageable and easy to implement.&lt;/p&gt;

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

&lt;p&gt;Resources can be added to the clusters accordingly.&lt;/p&gt;

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

&lt;p&gt;Computer clusters can be expanded easily by adding additional computers to the network. Cluster computing is capable of combining several additional resources or the networks to the existing computer system.&lt;/p&gt;

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

&lt;p&gt;The other nodes will be active when one node gets failed and will function as a proxy for the failed node. This makes sure for enhanced availability.&lt;/p&gt;

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

&lt;p&gt;It can be upgraded to the superior specification or additional nodes can be added.&lt;/p&gt;

&lt;h2&gt;
  
  
  Disadvantages of Cluster Computing :
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;High cost :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is not so much cost-effective due to its high hardware and its design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem in finding fault :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is difficult to find which component has a fault.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;More space is needed :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Infrastructure may increase as more servers are needed to manage and monitor.  &lt;/p&gt;

&lt;h2&gt;
  
  
  4. Grid Computing :
&lt;/h2&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%2Fm0pdeovqolyeznpdfbic.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%2Fm0pdeovqolyeznpdfbic.png" alt="Grid computing" width="264" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Grid computing is the practice of leveraging multiple computers, often geographically distributed but connected by networks, to work together to accomplish joint tasks. &lt;/li&gt;
&lt;li&gt;It is typically run on a “data grid,” a set of computers that directly interact with each other to coordinate jobs.&lt;/li&gt;
&lt;li&gt;Grid computing works by running specialized software on every computer that participates in the data grid. The software acts as the manager of the entire system and coordinates various tasks across the grid. &lt;/li&gt;
&lt;li&gt;Specifically, the software assigns subtasks to each computer so they can work simultaneously on their respective subtasks.&lt;/li&gt;
&lt;li&gt;After the completion of subtasks, the outputs are gathered and aggregated to complete a larger-scale task. &lt;/li&gt;
&lt;li&gt;The software lets each computer communicate over the network with the other computers so they can share information on what portion of the subtasks each computer is running, and how to consolidate and deliver outputs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. What is Cloud Computing?
&lt;/h2&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%2F7olcnmhnxjvqig2eo765.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%2F7olcnmhnxjvqig2eo765.png" alt="cloud computing" width="256" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cloud computing is an internet-based computing service in which large groups of remote servers are networked to allow centralized data storage, and online access to computer services or resources.&lt;/li&gt;
&lt;li&gt;Using cloud computing, organizations can use shared computing and storage resources rather than building, operating, and improving infrastructure on their own.&lt;/li&gt;
&lt;li&gt;Cloud computing is a model that enables the following features:&lt;/li&gt;
&lt;li&gt;Users can provision and release resources on-demand&lt;/li&gt;
&lt;li&gt;Resources can be scaled up or down automatically, depending on the load.&lt;/li&gt;
&lt;li&gt;Resources are accessible over a network with proper security.&lt;/li&gt;
&lt;li&gt;Cloud service providers can enable a pay-as-you-go model, where customers are charged based on the type of resources and per usage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cloud Computing Models
&lt;/h2&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%2Fuuuan2eutkeach3m59zb.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%2Fuuuan2eutkeach3m59zb.png" alt="cloud computing model" width="310" height="162"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Types of Clouds :&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%2Fcdg1vq0l1glze5z90l4q.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%2Fcdg1vq0l1glze5z90l4q.png" alt="Types of cloud" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are three types of clouds - Public, Private, and Hybrid cloud. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Public Cloud&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In public cloud, the third-party service providers make resources and services available to their customers via Internet. Customer’s data and related security is with the service 
providers’ owned infrastructure. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Private Cloud&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A private cloud also provides almost similar features as public cloud, but the data and services are managed by the organization or by the third party only for the customer’s organization. In this type of cloud, major control is over the infrastructure so security related issues are minimized. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Hybrid Cloud&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A hybrid cloud is the combination of both private and public cloud. The decision to run on private or public cloud usually depends on various parameters like sensitivity of data and
applications, industry certifications and required standards, regulations, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cloud Service Models :
&lt;/h2&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%2F7yfd6f82oka8wm5o2esq.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%2F7yfd6f82oka8wm5o2esq.png" alt="cloud service models" width="275" height="183"&gt;&lt;/a&gt;&lt;br&gt;
There are three types of service models in cloud - IaaS, PaaS, and SaaS. &lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;IaaS stands for "Infrastructure as a Service". &lt;/li&gt;
&lt;li&gt;It provides users with the capability to provision processing, storage, and network connectivity on demand. &lt;/li&gt;
&lt;li&gt;Using this service model, the customers can develop their own applications on these resources. &lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;PaaS stands for "Platform as a Service". &lt;/li&gt;
&lt;li&gt;Here, the service provider provides various services like databases, queues, workflow engines, e-mails, etc. to their customers. &lt;/li&gt;
&lt;li&gt;The customer can then use these components for building their own applications. The services, availability of resources and data backup are handled by the service provider that helps
the customers to focus more on their application's functionality.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;SaaS stands for Software as a Service. &lt;/li&gt;
&lt;li&gt;As the name suggests, here the third-party providers provide end-user applications to their customers with some administrative 
capability at the application level, such as the ability to create and manage their users. &lt;/li&gt;
&lt;li&gt;Also some level of customizability is possible such as the customers can use their own corporate logos, colors, etc. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advantages of Cloud Computing:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost-Efficient:&lt;/strong&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Building our own servers and tools is time-consuming as well as expensive as we need to order, pay for, installing, and configure expensive hardware, long before we need it. However, using cloud computing, we only pay for the amount we use and when we use the computing resources. In this manner, cloud computing is cost efficient.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reliability:&lt;/strong&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A cloud computing platform provides much more managed, reliable &lt;br&gt;
and consistent service than an in-house IT infrastructure. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It guarantees 24x7 and365 days of service. If any of the server fails, then hosted applications and services can easily be migrated to any of the available servers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unlimited Storage:&lt;/strong&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud computing provides almost unlimited storage capacity,&lt;br&gt;
i.e., we need not worry about running out of storage space. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We can easily increase our current storage space availability. We can access as much or as little as we need. We can also decrease our storage space as per our requirement and cost of storage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Backup &amp;amp; Recovery:&lt;/strong&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Storing data in the cloud, backing it up and restoring the &lt;br&gt;
same is relatively easier than storing it on a physical device. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The cloud service providers also have enough technology to recover our data, so there is the convenience of recovering our data anytime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy Access to Information:&lt;/strong&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once you register yourself in cloud, you can access &lt;br&gt;
your account from anywhere in the world provided there is internet connection at that point. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There are various storage and security facilities that vary with the account type chosen. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Disadvantages of Cloud Computing:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security issues:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security is the major issue in cloud computing. The cloud service providers implement the best security standards and industry certifications, however, storing data and important &lt;br&gt;
files on external service providers always bears a risk. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS cloud infrastructure is designed to be the most flexible and secured cloud network. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It provides scalable and highly reliable platform that enables customers to deploy applications and data quickly and securely. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Technical issues:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As cloud service providers offer services to number of clients each day, sometimes the system can have some serious issues leading to business processes temporarily being suspended. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Additionally, if the internet connection is offline then we will not be able to access any of the applications, server, or data from the cloud.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Configuring EBS volume (Extending and reducing volume, Concept of snapshots)</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Mon, 31 Jan 2022 06:39:55 +0000</pubDate>
      <link>https://dev.to/atm_06/configuring-ebs-volume-extending-and-reducing-volume-concept-of-snapshots-56bg</link>
      <guid>https://dev.to/atm_06/configuring-ebs-volume-extending-and-reducing-volume-concept-of-snapshots-56bg</guid>
      <description>&lt;ul&gt;
&lt;li&gt;In the last blog we talked about AWS Block storage, EBS to be specific. We also discussed the types, uses of EBS volume, how to attach it to an instance and how to mount it in a disk.&lt;/li&gt;
&lt;li&gt;Let's move further and discuss about resizing, reducing the volume and some more interesting facts about EBS volume.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Resizing EBS volume
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Now go to volumes in aws console. Select the EBS volume we created "Extra-vol" and select modify volume. Change the volume size from (15GB to 20GB).
&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%2Fcdg2ohinul0aeggtcehs.png" alt="Image description" width="800" height="449"&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%2Fsxtyo0tjr3dxnd4ye7do.png" alt="Image description" width="800" height="449"&gt;
-Now go to xshell for your instance "Test-1" and t
ype "resize2fs /dev/xvdf" command to resize your volume from 15 to 20 GB.&lt;/li&gt;
&lt;li&gt;In xshell prompt you can list the volume attached with your instance by typing "df -h". You can see the 20GB vol. listed over there.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Attaching volume to different instances
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;For attaching volume (20GB) to another instance we've to first unmount "Extra-vol" from "Test-1" instance.&lt;/li&gt;
&lt;li&gt;We should never go for forced detaching of volume. Rather we should first unmount it as per the best industrial practices.&lt;/li&gt;
&lt;li&gt;To unmount the vol, go to the root folder and then type "umount /india" or "umount /dev/xvdf" any of these two will do.
&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%2Fx8a54x2rgi5s2k688d33.PNG" alt="Unmounting of volume from disk" width="800" height="156"&gt;
-Now detach the "Extra-vol" from "Test-1" server and create another instance in same region as that of the EBS volume (say "Test-2" server in ap-south-1a region).&lt;/li&gt;
&lt;li&gt;Connect the "Test-2" server via SSH. Attach "Extra-vol" to "Test-2". Verify the same by typing "lsblk" in xshell prompt.
&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%2Fjxnu7av6bxz6d5yx6rcg.png" alt="Image description" width="800" height="449"&gt;
-Now mount the EBS volume by creating a directory in Test-2 console(We don't have to format the disk again as it was formatted once).&lt;/li&gt;
&lt;li&gt;Now create another instance "Test-3" in another region (ap-south-1b). Now let's unmount and detach the volume from Test-2 and attach it to Test-3.&lt;/li&gt;
&lt;li&gt;To unmount follow the same procedure as discussed earlier. Go to root folder and type umount /dev/xvdf. Now detach the volume from "Test-2" server.&lt;/li&gt;
&lt;li&gt;Now the challenge is how to attach "Extra-vol" to "Test-3". Because, the server and volume belong to different regions. Hence, we take the help of snapshots in this case.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amazon EBS snapshots
&lt;/h2&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%2F6a1ab9v99k4conxbpjv2.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%2F6a1ab9v99k4conxbpjv2.PNG" alt="Image description" width="594" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can back up the data on your Amazon EBS volumes to Amazon S3 by taking point-in-time snapshots.&lt;/li&gt;
&lt;li&gt;Snapshots are incremental backups, which means that only the blocks on the device that have changed after your most recent snapshot are saved. This minimizes the time required to create the snapshot and saves on storage costs by not duplicating data. &lt;/li&gt;
&lt;li&gt;Each snapshot contains all of the information that is needed to restore your data (from the moment when the snapshot was taken) to a new EBS volume.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating EBS volume from snapshots
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When you create an EBS volume based on a snapshot, the new volume begins as an exact replica of the original volume that was used to create the snapshot. &lt;/li&gt;
&lt;li&gt;The replicated volume loads data in the background so that you can begin using it immediately. If you access data that hasn't been loaded yet, the volume immediately downloads the requested data from Amazon S3, and then continues loading the rest of the volume's data in the background.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Snapshots Pricing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Charges for your snapshots are based on the amount of data stored. Because snapshots are incremental, deleting a snapshot might not reduce your data storage costs. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data referenced exclusively by a snapshot is removed when that snapshot is deleted, but data referenced by other snapshots is preserved.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now  let's go back to aws console and create a snapshot for the EBS volume. Name the snapshot as (Extra-vol-snapshot).&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%2Fg6zl26sjlyuy9dqgpg41.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%2Fg6zl26sjlyuy9dqgpg41.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
-Now create volume "New-vol" from snapshot that you've created in the earlier step. remember that we've to create the volume in the same region as that of "Test-3" server i.e, in ap-south-1b region.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Attach the "New-vol" to the server "Test-3". In Test-3 console mount the volume.&lt;/p&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%2Fkdlsrn74yvrv4coanr4t.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%2Fkdlsrn74yvrv4coanr4t.png" alt="Image description" width="800" height="449"&gt;&lt;/a&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%2F86zaawl1j1z1817hi6uw.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%2F86zaawl1j1z1817hi6uw.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can list the volumes in the disk by "df-h". Now go inside "india" directory and type "ls". You can see the 100 files that you created earlier are present. &lt;/li&gt;
&lt;li&gt;Now let's create another volume say 1GB  under the name "Reduced-vol". Deploy the volume in same region as that of "Test-3" server.&lt;/li&gt;
&lt;li&gt;Now attach the "Reduced-vol" to "Test-3" server. Mount the volume  to a disk you've created (say software).&lt;/li&gt;
&lt;li&gt;Now let's sync all the files present in "india" directory to "software" directory by using the command "rsync -aHAXxSP /india/ /software".&lt;/li&gt;
&lt;li&gt;Now type ls inside the software directory. You can see all the 100 files listed over there that you created earlier.&lt;/li&gt;
&lt;li&gt;After you're done with testing, unmount the volume , detach it from "Test-3" server. After checking the above steps you can delete the EBS volumes and the snapshots you've created in ealier steps and terminate the "Test-3" server.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amazon Data Lifecycle Manager
&lt;/h2&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%2Fhc6l6k47sg63mcjqof9h.jpg" 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%2Fhc6l6k47sg63mcjqof9h.jpg" alt="Image description" width="320" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You can use Amazon Data Lifecycle Manager to automate the creation, retention, and deletion of EBS snapshots and EBS-backed AMIs. When you automate snapshot and AMI management, it helps you to:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Protect valuable data by enforcing a regular backup schedule.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create standardized AMIs that can be refreshed at regular intervals.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Retain backups as required by auditors or internal compliance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reduce storage costs by deleting outdated backups.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create disaster recovery backup policies that back up data to isolated accounts.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How Amazon Data Lifecycle Manager works
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Snapshots&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Snapshots are the primary means to back up data from your EBS volumes. Snapshots are incremental, containing only the volume data that changed since the previous snapshot. &lt;/li&gt;
&lt;li&gt;When you delete one snapshot in a series of snapshots for a volume, only the data that's unique to that snapshot is removed. The rest of the captured history of the volume is preserved.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;EBS-backed AMIs&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Amazon Machine Image (AMI) provides the information that's required to launch an instance. You can launch multiple instances from a single AMI when you need multiple instances with the same
configuration. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon Data Lifecycle Manager supports EBS-backed AMIs only. EBS-backed AMIs include a snapshot for each EBS volume that's attached to the source instance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now let's enable a Lifecycle manager policy. First create an instance(Test-server). &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For lifecycle manager select type of backup. Here I'll take the instance backup. Under policy description, type "My-backup-policy". Keep policy status "enabled".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now set the frequency of backup as per your convenience such as: Daily, weekly or monthly. Set the UTC time and expire time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Establishing lifecycle manager will help you to store the data of "Test-server" in RDS database for easier queries. Hence, even if your server gets corrupted, backup will be always available in RDS.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank You. :)&lt;/p&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Amazon Elastic Block Storage (EBS)</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Mon, 24 Jan 2022 12:19:50 +0000</pubDate>
      <link>https://dev.to/atm_06/amazon-elastic-block-storage-ebs-4m5a</link>
      <guid>https://dev.to/atm_06/amazon-elastic-block-storage-ebs-4m5a</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Instance storage?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Block-level storage volumes behave like physical hard drives.&lt;/li&gt;
&lt;li&gt;An instance store provides temporary block-level storage for an Amazon EC2 instance. &lt;/li&gt;
&lt;li&gt;An instance store is disk storage that is physically attached to the host computer for an EC2 instance, and therefore has the same 
lifespan as the instance. When the instance is terminated, you lose any data in the instance store.&lt;/li&gt;
&lt;li&gt;Let's create two ec2 instances such as "Ticked-server" and "Unticked-server" based upon their delete on termination protection for instance storage is kept on or off.
&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%2F2bjkepnnnmxd8a01gi1o.png" alt="Image description" width="800" height="449"&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%2Ficpv7c5ua19lbs0yslp2.png" alt="Image description" width="800" height="449"&gt;
-But if we terminate instances we are likely to lose our instance volumes.
&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%2Frppziz7dq2bip5vc1lgy.PNG" alt="Image description" width="473" height="481"&gt; 
-Now let's terminate both the instances. After termination we can see that the volume for unticked server remains as such. Thus even on termination we can have our data secured if we untick the "delete on termination section".
&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%2F7w6an6yt010tkafz5xs2.png" alt="Image description" width="800" height="449"&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%2Fdvoau2iw2rgo3l1zpvaf.png" alt="Image description" width="800" height="449"&gt;
&lt;strong&gt;Amazon Elastic Block Store (EBS)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;EBS is a block storage system used to store persistent data. &lt;/li&gt;
&lt;li&gt;Amazon EBS is suitable for EC2 instances by providing highly available block level storage volumes. &lt;/li&gt;
&lt;li&gt;It has three types of volume, i.e. General Purpose (SSD), Provisioned IOPS (SSD), and Magnetic. These three volume types differ in performance, characteristics, and cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;EBS General Purpose (SSD)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This volume type is suitable for small and medium workloads like Root disk EC2 volumes, small and medium database workloads, frequently logs accessing workloads, etc. By default, SSD supports 3 IOPS (Input Output Operations per Second)/GB means 1 GB 
volume will give 3 IOPS, and 10 GB volume will give 30 IOPS. Its storage capacity of one volume ranges from 1 GB to 1 TB. The cost of one volume is $0.10 per GB for one month.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Provisioned IOPS (SSD)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This volume type is suitable for the most demanding I/O intensive, transactional workloads. By default, IOPS SSD supports 30 IOPS/GB, means 10GB volume will give 300 IOPS. Its storage capacity of one volume ranges from 10GB to 1TB. The cost of one volume is $0.125 per GB for one month for
provisioned storage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;EBS Magnetic Volumes&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It was formerly known as standard volumes. This volume type is suitable for ideal workloads like infrequently accessing data, i.e. data backups for recovery, logs storage. Its storage capacity of one volume ranges from 10GB to 1TB. The cost of one volume 
is $0.05 per GB for one month for provisioned storage and $0. 05 per million I/O requests. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Amazon EBS Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reliable and secure storage: Each of the EBS volume will automatically respond to its Availability Zone to protect from component failure.&lt;/li&gt;
&lt;li&gt;Secure: Amazon’s flexible access control policies allows to specify who can access which EBS volumes. &lt;/li&gt;
&lt;li&gt;Higher performance: Amazon EBS uses SSD technology to deliver data results with consistent I/O performance of application.&lt;/li&gt;
&lt;li&gt;Easy data backup: Data backup can be saved by taking point-in-time snapshots of Amazon EBS volumes. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Adding an EBS volume to an instance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let's create an instance "Test-1" and connect it via SSH using Xshell.&lt;/li&gt;
&lt;li&gt;In Xshell type "sudo su" to login using root user.&lt;/li&gt;
&lt;li&gt;Now to add extra volume to the instance, create an EBS volume of size say(15GB) and the volume should be created in the same region as that of the instance.
&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%2F8hz1z1ea1grc4g4ksewh.png" alt="Image description" width="800" height="449"&gt;
&lt;/li&gt;
&lt;li&gt;Now attach the extra volume to your instance "Test-1". If you type "lsblk" on Xshell, you can see your 15GB vol. is addaed to your instance but it's not mounted yet.
&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%2F7s57g711ffrjd140u8n7.png" alt="Image description" width="800" height="449"&gt;
-To mount the Extra-vol, first make a directory in the root then change path to  that directory and mount your volume there.&lt;/li&gt;
&lt;li&gt;In order to mount your EBS volume, first format the ddisk "india" using command "mkfs.ext4 /dev/xvdf". After formatting the disk mount your vol. using the command "mount /dev/xvdf /india".&lt;/li&gt;
&lt;li&gt;You can list the volumes attached to your disk by running "df -h" in Xshell.
&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%2Ft9n7d0ughv0ttztovfwi.png" alt="Image description" width="800" height="449"&gt;
-Now create 100 files inside your folder using command "touch abc{1..100}&lt;/li&gt;
&lt;li&gt;Now let's shutdown and restart the instance, we can observe that the particular volume that we mounted (15GB vol.) will be unmounted from the disk.&lt;/li&gt;
&lt;li&gt;If we again mount the volume to our disk, we can't see our files listed. Hence, In order to make the changes permanent, we'll use Vi editor in fstab. It's for permanently mounting the volume to the disk.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To use the vi editor use the command "vi /etc/fstab". Enter i to insert. In the editor write " /dev/xvdf    /india   ext4 defaults 0 0". Then press esc and :wq to save the file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;now if we again restart our instance, we can see our 100 files listed in india folder as we made the changes permanent.&lt;/p&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%2Fznz63dp808dg3441ftyj.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%2Fznz63dp808dg3441ftyj.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>ebs</category>
    </item>
    <item>
      <title>What is EC2 instance and Setup of EC2 instances.</title>
      <dc:creator>Ashutosh Mallick</dc:creator>
      <pubDate>Tue, 18 Jan 2022 05:41:08 +0000</pubDate>
      <link>https://dev.to/atm_06/what-is-ec2-instance-and-setup-of-ec2-instances-4abk</link>
      <guid>https://dev.to/atm_06/what-is-ec2-instance-and-setup-of-ec2-instances-4abk</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;WHAT IS AN EC2 INSTANCE?&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon EC2 stands for Amazon Elastic Compute Cloud.&lt;/li&gt;
&lt;li&gt;Cloud service providers like AWS, Azure and GCP etc. use hypervisors in their physical servers to virtualize it.&lt;/li&gt;
&lt;li&gt;EC2 instances are virtual machines (VMs) using those Hypervisors.&lt;/li&gt;
&lt;li&gt;EC2 provides scalable computing capacity in the AWS Cloud and eliminates your need to invest in hardware up front, so you can develop and deploy applications faster.
-EC2 helps to launch as many virtual servers as you need, configure security and networking, and manage storage.&lt;/li&gt;
&lt;li&gt;EC2 provides a wide range of instance types optimized to fit different use cases.&lt;/li&gt;
&lt;li&gt;Instances are virtual servers and have varying combinations of CPUs, memory storage and networking capacity.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;FEATURES OF EC2 INSTANCE&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;• Virtual computing environments, known as instances AND Preconfigured templates for your instances, known as Amazon Machine Images Or AMIs.&lt;br&gt;
• Various configurations of CPU, memory, storage, and networking capacity for your instances, known as instance types.&lt;br&gt;
• Secure login information for your instances using key pairs (AWS stores the public key, and you store the private key in a secure place)&lt;br&gt;
• Storage volumes for temporary data that's deleted when you stop, hibernate, or terminate your instance, known as instance store volumes.&lt;br&gt;
• Persistent storage volumes for your data using Amazon Elastic Block Store (Amazon EBS), known as Amazon EBS volumes.&lt;br&gt;
• Multiple physical locations for your resources, such as instances and Amazon EBS volumes, known as Regions and Availability Zones.&lt;br&gt;
• A firewall that enables you to specify the protocols, ports, and source IP ranges that can reach your instances using security groups.&lt;br&gt;
• Metadata, known as tags, that you can create and assign to your Amazon EC2 resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;SETUP OF EC2 INSTANCE&lt;/u&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Step 1: Sign-in to AWS account and open IAM console by using the following link: &lt;a href="https://console.aws.amazon.com/iam/"&gt;https://console.aws.amazon.com/iam/&lt;/a&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%2Fxi63nbb263hpim2lflzd.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%2Fxi63nbb263hpim2lflzd.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Step-2: In the navigation panel select EC2 service. On EC2 dashboard select instances from the left panel then click on launch 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%2F59vf3ndyahs91eff0jl7.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%2F59vf3ndyahs91eff0jl7.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
-Step-3: Select an AMI from the list of various AMIs like( Amazon AMI, Linux AMI, Red hat AMI, Windows Server AMI etc.), let's select Amazon AMI.&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%2F3auyukk2rgmpyl3e7lp4.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%2F3auyukk2rgmpyl3e7lp4.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Step-4: Select an Instance type from the list of instances, let's use "t2.micro" as it is eligible for free tier.&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%2F4k2nfkji7pj138lltmr5.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%2F4k2nfkji7pj138lltmr5.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
-Step-5: Configure instance details such as no. of instances you want to run or specify VPC network or Subnet. Here I've kept the specifications as default.&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%2Fv9ojqwzvaobglsdspd0r.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%2Fv9ojqwzvaobglsdspd0r.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Step-6: Add storage for your instance as per your requirement or you can select the default root volume.
&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%2F2sa42n3vtzzo15j171dw.png" alt="Image description" width="800" height="449"&gt;
-Step-7:  Add tags for your instance. A tag consists of a case-sensitive key-value pair. you could define a tag with key=Name and value = Webserver .A copy of a tag can be applied to volumes, instances or both.
&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%2Fahkou4j595zc37fnghfw.png" alt="Image description" width="800" height="449"&gt;
-Step-8: Configure security groups. security group is a set of firewall rules that control the traffic for your instance. you can add rules to allow specific traffic to your instance. If you want to set up a web server and allow Internet traffic to reach your instance, add rules that allow unrestricted access to the HTTP and HTTPS ports. You can create a new security group or select from an existing one.&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%2Fkmhrubdhpbj4ge7p9qmu.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%2Fkmhrubdhpbj4ge7p9qmu.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
-Step-9: Review Instance Launch. &lt;br&gt;
You can Cancel Previous Launch, review your instance launch details, go back to edit changes for each section. Click Launch to assign a key pair to your instance and complete the launch process. Don't forget to download your key pair file.&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%2Fmnftgy6zv4yhzsrgea6l.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%2Fmnftgy6zv4yhzsrgea6l.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
-Step-10: If your instance is successfully launched you can see Green check mark with instance state as "Running" and status as "2/2 checks passed" respectively.&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%2Fuwh7vvfnanpf2z8yer4p.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%2Fuwh7vvfnanpf2z8yer4p.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Step-11: You can connect your instance using public DNS of your instance via SSH client using command prompt or Xshell or using PUTTY/PUTTYGEN.
Here I've shown how to connect your instance using Xshell.
First Install XSHELL from this link: &lt;a href="https://www.netsarang.com/en/free-for-home-school/"&gt;https://www.netsarang.com/en/free-for-home-school/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;paste your Public DNS in Xshell prompt and click accept. Then select Browse and select your private key pair file and open it. Your instance will now be connected via SSH.&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%2F5x4u03wocz58uqr55h02.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%2F5x4u03wocz58uqr55h02.png" alt="Image description" width="800" height="449"&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%2Fpb6hscws3p3yn4d5jk6j.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%2Fpb6hscws3p3yn4d5jk6j.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can also perform the above steps for an windows server instance using RDP client.&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%2Fno3iy3dd2k8339rf0lky.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%2Fno3iy3dd2k8339rf0lky.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
-After launching the instance select RDP client and download the RDP file. Then generate password and decrypt the password.&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%2Fjhvf7feykm4ufrrqyh7r.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%2Fjhvf7feykm4ufrrqyh7r.png" alt="Image description" width="800" height="449"&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%2Fxknntkv22whn4mdd7xuk.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%2Fxknntkv22whn4mdd7xuk.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
-Now open the RDP file and login using the decrypted password. When you connect you will be redirected to the remote desktop server and you can can connect your instance remotely.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finally terminate the instance you have created otherwise you'll end up with bills from AWS.&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%2Fkmwywbx0n3ougu4ugkyk.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%2Fkmwywbx0n3ougu4ugkyk.png" alt="Image description" width="800" height="449"&gt;&lt;/a&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%2Fcz7x1b0fqcbebsubu5at.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%2Fcz7x1b0fqcbebsubu5at.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thank you :)&lt;/strong&gt;&lt;/p&gt;

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