<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Zahraa Jawad</title>
    <description>The latest articles on Forem by Zahraa Jawad (@zahraajawad).</description>
    <link>https://forem.com/zahraajawad</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%2F917675%2F5c61fd38-352d-4012-b027-86a9ca71097d.jpg</url>
      <title>Forem: Zahraa Jawad</title>
      <link>https://forem.com/zahraajawad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/zahraajawad"/>
    <language>en</language>
    <item>
      <title>Hosting n8n on AWS EC2 with Docker</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Sun, 06 Jul 2025 16:03:58 +0000</pubDate>
      <link>https://forem.com/zahraajawad/hosting-n8n-on-aws-ec2-with-docker-imj</link>
      <guid>https://forem.com/zahraajawad/hosting-n8n-on-aws-ec2-with-docker-imj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Outline&lt;/strong&gt;&lt;br&gt;
    Introduction to n8n&lt;br&gt;
    Why use n8n&lt;br&gt;
    Steps to build and run n8n on AWS&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction to n8n&lt;/strong&gt;&lt;br&gt;
It’s open-source, offering a free self-hosted option and affordable cloud plans. It blends no-code simplicity with low-code flexibility, supporting everything from basic automation to custom-coded integrations. This versatility fuels a wide range of n8n use cases, making it a go-to for anyone aiming to automate smarter.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Why use n8n&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;n8n (pronounced n-eight-n) helps you to connect any app with an API with any other, and manipulate its data with little or no code.&lt;br&gt;
&lt;strong&gt;Customizable:&lt;/strong&gt; Highly flexible workflows and the option to build custom nodes.&lt;br&gt;
&lt;strong&gt;Convenient:&lt;/strong&gt; Use npm or Docker to try out n8n, or the Cloud hosting option if you want us to handle the infrastructure.&lt;br&gt;
&lt;strong&gt;Privacy-focused:&lt;/strong&gt; Self-host n8n for privacy and security.&lt;br&gt;
&lt;a href="https://docs.n8n.io/" rel="noopener noreferrer"&gt;from n8n documintation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Steps to build and run n8n on AWS&lt;/strong&gt;&lt;br&gt;
    In this article, we will use AWS to build n8n in simple steps by creating a free tier instance in our AWS account and installing Docker and Docker Compose to build and run n8n.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before we start, note that this setup is unencrypted (HTTP only) and is suitable for testing or development environments only.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: "Launch Instance"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When logging into the AWS account, we select the EC2 service through Services or by the search box:&lt;/p&gt;

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

&lt;p&gt;Click on &lt;strong&gt;Launch instance&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Under Name and tags&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enter a name to identify your instance. For this tutorial, name the instance (n8n-server)&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Under Application and OS Images:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From Quick Start, choose an AMI that meets your web server needs&lt;br&gt;
Here we choose Ubuntu (which is free tier eligible)&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Under Instance type:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Choose the type of instance. Here we choose t2.micro(which is a free tier eligible).&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Under Key pair (login):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Choose the key pair&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxx7zxmkz15f1ushj5t4t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxx7zxmkz15f1ushj5t4t.png" alt=" " width="742" height="301"&gt;&lt;/a&gt;&lt;br&gt;
or create a new key pair:&lt;br&gt;
Give a name to the key pair, then click &lt;strong&gt;Create key pair&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Under Network settings: under Firewall (security groups)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Choose to create security groups&lt;br&gt;
&lt;strong&gt;To Allow SSH traffic&lt;/strong&gt; by clicking on the check box&lt;/p&gt;

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

&lt;p&gt;Leave all other configurations as they are (default settings)&lt;/p&gt;

&lt;p&gt;In the Summary panel, review your instance configuration and then choose &lt;strong&gt;Launch instance&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;Successfully initiated the launch of the instance, and to see the instance, click on the ID:&lt;/p&gt;

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

&lt;p&gt;Your instance will first be &lt;strong&gt;Pending&lt;/strong&gt;, and will then go into the &lt;strong&gt;Running&lt;/strong&gt; state.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 2: "Connect to the instance"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To connect to your instance, select the instance and choose Connect.&lt;/p&gt;

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

&lt;p&gt;There are many ways to connect to EC2, here we will choose the &lt;strong&gt;SSH client&lt;/strong&gt; to connect.&lt;br&gt;
After selecting the "&lt;strong&gt;SSH Client&lt;/strong&gt;" section, copy and execute the following commands in the terminal as per the following steps:&lt;/p&gt;

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

&lt;p&gt;Open Terminal (here we use Git Bash)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fckkhlksbz7ddlgzn91id.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fckkhlksbz7ddlgzn91id.png" alt=" " width="580" height="104"&gt;&lt;/a&gt;&lt;br&gt;
Change the directory with the &lt;code&gt;cd&lt;/code&gt; command (change directory), where you have downloaded your pem file(key pair).&lt;/p&gt;

&lt;p&gt;In this article, the pem file is stored in the downloads folder.&lt;/p&gt;

&lt;p&gt;Execute the &lt;code&gt;cd&lt;/code&gt; command to change the path to the location of the encryption key&lt;br&gt;
&lt;code&gt;cd Download/&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Execute the following commands sequentially&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;chmod 400 [key pair name].pem&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;ssh -i /path/key-pair-name.pem instance-user-name@instance-public-dns-name&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;After the command is executed you will be prompted to type “Yes” to continue with the connection&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23x35ym8v61s471abplj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23x35ym8v61s471abplj.png" alt=" " width="563" height="134"&gt;&lt;/a&gt;&lt;br&gt;
And that’s it! Now we’re logged in to our AWS instance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1rbgdji639oz5xya1o46.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1rbgdji639oz5xya1o46.png" alt=" " width="562" height="334"&gt;&lt;/a&gt;&lt;br&gt;
Now, to complete our work, we get root permission by executing the &lt;code&gt;sudo -i&lt;/code&gt; command:&lt;/p&gt;

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

&lt;p&gt;Executing the command "sudo -i" means booting as root on Linux. This command's main feature is that it gives you full admin (root user) privileges, allowing you to perform commands and operations that require root user privileges.&lt;br&gt;
We update the repositories through the command:&lt;br&gt;
&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade -y&lt;/code&gt;&lt;/p&gt;

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

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

&lt;p&gt;&lt;strong&gt;Step 3: "Install Docker"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After connecting to the instance via SSH and obtaining the root privilege, use the following command automation to install Docker:&lt;br&gt;
&lt;code&gt;sudo apt update&lt;br&gt;
sudo apt install -y docker.io&lt;br&gt;
sudo systemctl enable docker&lt;br&gt;
sudo systemctl start docker&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftg3g9a37lsx0e728jow5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftg3g9a37lsx0e728jow5.png" alt=" " width="709" height="108"&gt;&lt;/a&gt;&lt;br&gt;
Docker has been installed on the instance successfully.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Docker experience:&lt;/strong&gt; Run a simple test command &lt;code&gt;docker -v&lt;/code&gt; to check that Docker is working properly and to see the Docker version:&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 4:Install Docker Compose:&lt;/strong&gt;&lt;br&gt;
Now we install Docker Compose using the command:&lt;br&gt;
&lt;code&gt;sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" \&lt;br&gt;
  -o /usr/local/bin/docker-compose&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fptdn0obfp0gcu1t65yvm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fptdn0obfp0gcu1t65yvm.png" alt=" " width="559" height="113"&gt;&lt;/a&gt;&lt;br&gt;
Grant operating permissions:&lt;br&gt;
&lt;code&gt;sudo chmod +x /usr/local/bin/docker-compose&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23nsdp4pkq1ik5cww8wn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23nsdp4pkq1ik5cww8wn.png" alt=" " width="563" height="31"&gt;&lt;/a&gt;&lt;br&gt;
Then, check the installation by running the command:&lt;br&gt;
&lt;code&gt;docker-compose --version&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 5: Install n8n&lt;/strong&gt;&lt;br&gt;
First, we create a project folder for n8n and prepare the necessary files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a folder for our project using the &lt;code&gt;mkdir&lt;/code&gt;command, and enter this folder using the &lt;code&gt;cd&lt;/code&gt;command, as:
&lt;code&gt;mkdir ~/n8n-server &amp;amp;&amp;amp; cd ~/n8n-server
mkdir n8n_data&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Then permit the data folder:
&lt;code&gt;sudo chown -R 1000:1000 ./n8n_data&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Create the docker-compose.yml file &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now we create the docker-compose.yml file, through the command vim or nano and put the code in the file. Here we will use the command nano: &lt;br&gt;
&lt;code&gt;nano docker-compose.yml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And past the codes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjsc06vprgels3ewhjlze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjsc06vprgels3ewhjlze.png" alt=" " width="564" height="333"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; N8N_HOST=[Puplic Ip of your instance]&lt;br&gt;
and N8N_WEBHOOK_URL=http://[Puplic Ip of your instance]:5678/&lt;/p&gt;

&lt;p&gt;Then exit the file from the keyboard by ctrl x, then y (to save the file) then click Enter&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 6: Open the n8n port in AWS:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To open the port for the host n8n,  go to your AWS account and select the instance that was created for the server, then  select security and open your security group:&lt;/p&gt;

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

&lt;p&gt;Choose the &lt;strong&gt;inboud rules&lt;/strong&gt; then &lt;strong&gt;Edit inbound rules&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Click on &lt;strong&gt;Add rule&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Enter the rule:&lt;/p&gt;

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

&lt;p&gt;We choose the type: &lt;strong&gt;Custom TCP&lt;/strong&gt;, port:  &lt;strong&gt;5678&lt;/strong&gt;, and source: &lt;strong&gt;0.0.0.0/0&lt;/strong&gt; (or choose a private IP address for more security).&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; In practice, it is not preferable to leave the state 0.0.0.0/0 This is easy to hack, but we are here to learn the labs and the building process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run the n8n&lt;/strong&gt;:&lt;br&gt;
To run the n8n, we execute the command:&lt;br&gt;
&lt;code&gt;docker-compose up -d&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpsj97tl41f6lbicde1zr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpsj97tl41f6lbicde1zr.png" alt=" " width="800" height="481"&gt;&lt;/a&gt;&lt;br&gt;
To verify that the container is running, we execute the command:&lt;br&gt;
&lt;strong&gt;docker ps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhf9wztxpf0xdfzfp7t72.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhf9wztxpf0xdfzfp7t72.png" alt=" " width="800" height="119"&gt;&lt;/a&gt;&lt;br&gt;
The container has been launched successfully, and now we can go to the browser to run the application.&lt;/p&gt;

&lt;p&gt;Now, go back to the instance and select it, then go to the &lt;strong&gt;Details&lt;/strong&gt; and copy the &lt;strong&gt;Public IPv4 address&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Paste the public IPv4 address with port &lt;strong&gt;5678&lt;/strong&gt; into the browser and press Enter&lt;/p&gt;

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

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

&lt;p&gt;&lt;strong&gt;n8n has been successfully built.&lt;/strong&gt;This is the first account setup page &lt;strong&gt;(owner account)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We enter our email, first name, last name, and a strong password, then click Next.&lt;/p&gt;

&lt;p&gt;We will complete the rest of the settings according to your work.&lt;/p&gt;

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

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

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

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

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

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

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

&lt;p&gt;n8n is now fully operational on a public IP of AWS EC2 using Docker and is ready to build your Workflows or connect with your other tools.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://groovetechnology.com/blog/software-development/exploring-n8n-use-cases-your-ultimate-guide-to-smarter-automation-in-2025/" rel="noopener noreferrer"&gt;https://groovetechnology.com/blog/software-development/exploring-n8n-use-cases-your-ultimate-guide-to-smarter-automation-in-2025/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.n8n.io/" rel="noopener noreferrer"&gt;https://docs.n8n.io/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>docker</category>
      <category>n8n</category>
      <category>ai</category>
    </item>
    <item>
      <title>AI-Powered Text Analysis Using AWS Comprehend with a Flask Web Interface</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Tue, 05 Nov 2024 19:44:34 +0000</pubDate>
      <link>https://forem.com/zahraajawad/ai-powered-text-analysis-using-aws-comprehend-with-a-flask-web-interface-51el</link>
      <guid>https://forem.com/zahraajawad/ai-powered-text-analysis-using-aws-comprehend-with-a-flask-web-interface-51el</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction to the idea of the work&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this work, we will build a Text Analysis application using AWS AI services. This application will allow users to enter text, and then process it using Amazon Comprehend to extract Sentiment Analysis, Entity Recognition, and Categories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Comprehend&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here’s what Amazon says about &lt;a href="https://docs.aws.amazon.com/comprehend/latest/dg/what-is.html" rel="noopener noreferrer"&gt;Amazon Comprehend in their official documentation&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Amazon Comprehend uses natural language processing (NLP) to extract insights about the content of documents. It develops insights by recognizing the entities, key phrases, language, sentiments, and other common elements in a document. Use Amazon Comprehend to create new products based on understanding the structure of documents. For example, using Amazon Comprehend you can search social networking feeds for mentions of products or scan an entire document repository for key phrases.You can access Amazon Comprehend document analysis capabilities using the Amazon Comprehend console or using the Amazon Comprehend APIs. You can run real-time analysis for small workloads or you can start asynchronous analysis jobs for large document sets. You can use the pre-trained models that Amazon Comprehend provides, or you can train your own custom models for classification and entity recognition.Amazon Comprehend uses a pre-trained model to examine and analyze a document or set of documents to gather insights about it. This model is continuously trained on a large body of text so that there is no need for you to provide training data.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(Quoted from &lt;a href="https://docs.aws.amazon.com/comprehend/latest/dg/what-is.html" rel="noopener noreferrer"&gt;Amazon Comprehend in their official documentation&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key benefits of our work:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easily analyze text data:&lt;/strong&gt; This application enables us to quickly analyze texts to extract sentiment (positive, negative, mixed), entities (such as names and places), and important keywords.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Using AWS cloud services:&lt;/strong&gt; You can explore and use AWS AI services such as Amazon Comprehend to provide advanced analytics in a simple and effective way.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Displaying results in an understandable and organized way:&lt;/strong&gt; The results are displayed in the form of understandable and clear tables in a black interface (such as an SSH screen) and a web page. This enhances the understanding of the analytics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interactive web interface:&lt;/strong&gt; The web interface allows you to view the analysis results in an organized and easy-to-understand way, making it easy to share or display the results to others.&lt;br&gt;
Learning and using Flask: It provides an opportunity to learn how to create a simple web application using Flask, which adds skill in developing web applications with Python.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The steps we need will be as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Launch an instance (your machine)&lt;/li&gt;
&lt;li&gt;Setting up a Python virtual environment&lt;/li&gt;
&lt;li&gt;Configure AWS Credentials&lt;/li&gt;
&lt;li&gt;Write Python code to display results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step (1)-Launch an instance (your machine)&lt;/strong&gt;&lt;br&gt;
You can find the same steps of the launch and connect of instance described in the article:&lt;br&gt;
&lt;a href="https://dev.to/zahraajawad/building-a-jupyter-notebook-environment-in-docker-for-data-analysis-on-aws-ec2-376i"&gt;https://dev.to/zahraajawad/building-a-jupyter-notebook-environment-in-docker-for-data-analysis-on-aws-ec2-376i&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: Make sure you choose the security group:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Port 5000:&lt;/strong&gt; This is the default port that Flask uses to serve the web application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Port 22:&lt;/strong&gt; required for SSH access to your instance, which you use via Git to connect to the server.&lt;/p&gt;

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

&lt;p&gt;After updating the system through the command &lt;br&gt;
&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade –y&lt;/code&gt;  we install Python by the command :&lt;br&gt;
&lt;code&gt;sudo apt install python3 python3-venv python3-pip –y&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

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

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

&lt;p&gt;&lt;strong&gt;Step (2)- Setting up a Python virtual environment&lt;/strong&gt;&lt;br&gt;
A virtual work environment can be created by creating a new folder for work and then creating the virtual environment within this folder. This is done through the following steps and commands:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&lt;/strong&gt; Create a project folder by the command &lt;code&gt;mkdir my_project&lt;/code&gt; &lt;/p&gt;

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

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

&lt;p&gt;&lt;strong&gt;-&lt;/strong&gt; Then change the current directory by the command &lt;code&gt;cd my_project &lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;-&lt;/strong&gt;Now we create our virtual environment with the command  &lt;code&gt;python3 -m venv venv&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;-&lt;/strong&gt;We activate the virtual environment through  &lt;code&gt;source venv/bin/activate&lt;/code&gt;&lt;/p&gt;

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

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

&lt;p&gt;&lt;strong&gt;-&lt;/strong&gt; Now we need to make sure that boto3, Flask, and pandas are installed in our virtual environment and this is done through the command: &lt;br&gt;
&lt;code&gt;pip install boto3 pandas Flask&lt;/code&gt;&lt;/p&gt;

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

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

&lt;p&gt;&lt;strong&gt;Step (3)- Configure AWS Credentials&lt;/strong&gt;&lt;br&gt;
We now configure AWS Credentials to ensure that Amazon Comprehend can access resources securely and authoritatively. This is a way to verify the identity of a user or application and grant it the necessary permission to use the services and resources required to operate, This is done through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We install awscli in the Python virtual environment through the command:
&lt;code&gt;pip install awscli
&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flawditpd598ji4yrtzvc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flawditpd598ji4yrtzvc.png" alt=" " width="678" height="34"&gt;&lt;/a&gt;&lt;br&gt;
Then we make sure that the installation was successful by the command:&lt;br&gt;
&lt;code&gt;aws --version&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faqmvsxywqx48uwak001h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faqmvsxywqx48uwak001h.png" alt=" " width="800" height="476"&gt;&lt;/a&gt;&lt;br&gt;
After installation, we configure the credentials using the command: &lt;br&gt;
&lt;code&gt;aws configure&lt;/code&gt;&lt;br&gt;
Where we will need to enter our account credentials on the AWS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access Key.&lt;/li&gt;
&lt;li&gt;Then the Secret Access Key.&lt;/li&gt;
&lt;li&gt;And the Default region name - such as us-west-2 or ap-south-1.&lt;/li&gt;
&lt;li&gt;Finally the Default output format - which can be left blank or set to &lt;code&gt;json&lt;/code&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0n1itm8a53h4p0ugdhn2.png" alt=" " width="567" height="96"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step (4)-Write Python code to display results&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We will create two codes to display the results of text analysis using the service Amazon Comprehend:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;By displaying on the black screen (the terminal).&lt;/li&gt;
&lt;li&gt;By displaying on the web page by creating a simple web application using Flask.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Displaying text analysis results on the black screen(the terminal&lt;br&gt;
)&lt;/strong&gt;&lt;br&gt;
We create a new file called &lt;code&gt;text_analysis.py&lt;/code&gt; which contains the following functions and codes which we will explain in detail and which we will use to implement the text analysis and display on the black screen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To import the necessary libraries, boto3 and pandas, we use:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import boto3
import pandas as pd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;To create an AWS Comprehend client using the boto3 library we use:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
comprehend = boto3.client('comprehend')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;text  - The written text will be used for sentiment analysis, entity extraction, and key phrase detection:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;text = "AWS is a great service provider for AI applications."

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

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;For Sentiment Analysis, we use:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;-&lt;/strong&gt; comprehend.detect_sentiment: Calls &lt;strong&gt;AWS Comprehend&lt;/strong&gt; to perform analysis on the text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&lt;/strong&gt; &lt;code&gt;LanguageCode='en'&lt;/code&gt;: Specifies the language of the text (here is English)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&lt;/strong&gt; &lt;code&gt;sentiment_response&lt;/code&gt;: Stores the AWS Comprehend response, which includes sentiment details and scores.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&lt;/strong&gt; &lt;code&gt;sentiment_data&lt;/code&gt;: Contains the scores for each sentiment (positive, negative, neutral, mixed).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sentiment_response = comprehend.detect_sentiment(Text=text, LanguageCode='en')
sentiment_data = sentiment_response['SentimentScore']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To display the sentiment analysis results:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The sentiment scores are converted to a DataFrame using &lt;code&gt;pandas&lt;/code&gt; to display them in an organized manner without index numbers.&lt;/p&gt;

&lt;p&gt;and &lt;code&gt;to_string(index=False)&lt;/code&gt;: Used to display the data without index numbers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print("\nSentiment Analysis Results:")
sentiment_df = pd.DataFrame([sentiment_data], columns=['Positive', 'Negative', 'Neutral', 'Mixed'])
print(sentiment_df.to_string(index=False))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To extract entities: comprehend.detect_entities calls the AWS Comprehend service to extract entities in the text. As for &lt;code&gt;entities_data&lt;/code&gt;: It contains a list of the extracted entities (such as names, organizations, etc.), their type, and their accuracy levels.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;entities_response = comprehend.detect_entities(Text=text, LanguageCode='en')
entities_data = entities_response['Entities']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To create and display data for entities, a DataFrame is created from the extracted data and displayed in a structured form.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;entities_df = pd.DataFrame(entities_data)[['Text', 'Type', 'Score']]
print("\nEntities Recognition Results:")
print(entities_df.to_string(index=False))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To discover key phrases, the following is used:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;comprehend.detect_key_phrases&lt;/code&gt;: Calls the AWS Comprehend service to discover key phrases in the text.&lt;br&gt;
&lt;code&gt;key_phrases_data&lt;/code&gt;: Contains a list of key phrases and their accuracy scores.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;key_phrases_response = comprehend.detect_key_phrases(Text=text, LanguageCode='en')
key_phrases_data = key_phrases_response['KeyPhrases']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The DataFrame here is created from the main phrases and displayed in an organized form.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;key_phrases_df = pd.DataFrame(key_phrases_data)[['Text', 'Score']]
print("\nKey Phrases Detection Results:")
print(key_phrases_df.to_string(index=False))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the entire text_analysis.py file is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import boto3
import pandas as pd

# Create AWS Comprehend Client
comprehend = boto3.client('comprehend')

# Text to be analyzed
text = "AWS is a great service provider for AI applications."

# Sentiment Analysis
sentiment_response = comprehend.detect_sentiment(Text=text, LanguageCode='en')
sentiment_data = sentiment_response['SentimentScore']

# Show sentiment analysis results
print("\nSentiment Analysis Results:")
sentiment_df = pd.DataFrame([sentiment_data], columns=['Positive', 'Negative', 'Neutral', 'Mixed'])
print(sentiment_df.to_string(index=False))

# Entity extraction
entities_response = comprehend.detect_entities(Text=text, LanguageCode='en')
entities_data = entities_response['Entities']

# Create a DataFrame for entities
entities_df = pd.DataFrame(entities_data)[['Text', 'Type', 'Score']]
print("\nEntities Recognition Results:")
print(entities_df.to_string(index=False))

# Extract keywords
key_phrases_response = comprehend.detect_key_phrases(Text=text, LanguageCode='en')
key_phrases_data = key_phrases_response['KeyPhrases']

# Create a DataFrame for Keywords
key_phrases_df = pd.DataFrame(key_phrases_data)[['Text', 'Score']]
print("\nKey Phrases Detection Results:")
print(key_phrases_df.to_string(index=False))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now through the command &lt;code&gt;vim&lt;/code&gt; or &lt;code&gt;nano&lt;/code&gt; create the text_analysis.py file and put the above code in the file, here we will use the command &lt;code&gt;nano&lt;/code&gt;:&lt;br&gt;
&lt;code&gt;nano text_analysis.py&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;And past the codes:&lt;/p&gt;

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

&lt;p&gt;then exit the file from the keyboard by &lt;strong&gt;ctrl x&lt;/strong&gt; then &lt;strong&gt;y&lt;/strong&gt; (to save the file) then click enter&lt;/p&gt;

&lt;p&gt;Now we run the code and check the results by executing the following command:&lt;br&gt;
&lt;code&gt;python3 text_analysis.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5j7qe7l4buy4bzn67wps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5j7qe7l4buy4bzn67wps.png" alt=" " width="745" height="25"&gt;&lt;/a&gt;&lt;br&gt;
The results will appear as formatted tables on the black screen:&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Displaying the results on the web page by creating a simple web application using the Flask library in Python&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To display the results on the web page by creating a simple web application using Flask, we create a new file called &lt;code&gt;app.py&lt;/code&gt; which contains the following functions and codes which we will explain in detail and which we will use to implement the text analysis and display on the Web page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Below is to import the libraries needed to work
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask, render_template_string
import boto3
import pandas as pd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;To initialize and create a new Flask application object, we use:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app = Flask(__name__)

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

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;The code below is to create the home page path:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@app.route('/')
def home():
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;To create an AWS Comprehend client:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;comprehend = boto3.client('comprehend')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;The text that will be parsed by AWS Comprehend (here our text is "&lt;strong&gt;AWS is a great service provider for AI applications.&lt;/strong&gt;")
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; text = "AWS is a great service provider for AI applications."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;To analyze sentiment, we use:
&lt;code&gt;detect_sentiment&lt;/code&gt;: which calls the AWS Comprehend service to analyze the sentiment in the text.
&lt;code&gt;sentiment_response&lt;/code&gt;: stores the AWS service response.
Then convert the results to a DataFrame to display them in an organized manner
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sentiment_response = comprehend.detect_sentiment(Text=text, LanguageCode='en')
    sentiment_data = sentiment_response['SentimentScore']
    sentiment_df = pd.DataFrame([sentiment_data], columns=['Positive', 'Negative', 'Neutral', 'Mixed'])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;detect_entities&lt;/code&gt; function: Calls the AWS Comprehend service to extract entities from text, then converts the results to a DataFrame
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;entities_response = comprehend.detect_entities(Text=text, LanguageCode='en')
    entities_data = entities_response['Entities']
    entities_df = pd.DataFrame(entities_data)[['Text', 'Type', 'Score']]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;To discover key phrases, the &lt;code&gt;detect_key_phrases&lt;/code&gt; function is used, which calls the AWS service to discover key phrases and then converts the results to a DataFram
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;key_phrases_response = comprehend.detect_key_phrases(Text=text, LanguageCode='en')
    key_phrases_data = key_phrases_response['KeyPhrases']
    key_phrases_df = pd.DataFrame(key_phrases_data)[['Text', 'Score']]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;HTML template is used to display results where as templates are used to display tables in a web page.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html_template = """
    &amp;lt;h2&amp;gt;Sentiment Analysis Results:&amp;lt;/h2&amp;gt;
    {{ sentiment_table | safe }}
    &amp;lt;h2&amp;gt;Entities Recognition Results:&amp;lt;/h2&amp;gt;
    {{ entities_table | safe }}
    &amp;lt;h2&amp;gt;Key Phrases Detection Results:&amp;lt;/h2&amp;gt;
    {{ key_phrases_table | safe }}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;to_html(index=False)&lt;/code&gt; function converts tables from DataFrames to HTML without index numbers
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sentiment_table = sentiment_df.to_html(index=False)
    entities_table = entities_df.to_html(index=False)
    key_phrases_table = key_phrases_df.to_html(index=False)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;To render HTML and display tables on the page, the &lt;code&gt;render_template_string&lt;/code&gt; function is used
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return render_template_string(html_template, sentiment_table=sentiment_table,
                                  entities_table=entities_table, key_phrases_table=key_phrases_table)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Finally, to run the Flask application, we need to use:
&lt;code&gt;app.run()&lt;/code&gt;: To run the Flask application.
&lt;code&gt;host='0.0.0.0'&lt;/code&gt;: Makes the application available on all IP addresses of the host.
&lt;code&gt;port=5000&lt;/code&gt;: specifies the port to run the application (here port 5000).
&lt;code&gt;debug=True&lt;/code&gt;: Runs the application in debug mode to provide error information.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, debug=True)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So the entire app.py file is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask, render_template_string
import boto3
import pandas as pd

app = Flask(__name__)

@app.route('/')
def home():
# Create AWS Comprehend Client
    comprehend = boto3.client('comprehend')

# Text to be analyzed
    text = "AWS is a great service provider for AI applications."

# Sentiment Analysis
    sentiment_response = comprehend.detect_sentiment(Text=text, LanguageCode='en')
    sentiment_data = sentiment_response['SentimentScore']
    sentiment_df = pd.DataFrame([sentiment_data], columns=['Positive', 'Negative', 'Neutral', 'Mixed'])

# Entity extraction
    entities_response = comprehend.detect_entities(Text=text, LanguageCode='en')
    entities_data = entities_response['Entities']
    entities_df = pd.DataFrame(entities_data)[['Text', 'Type', 'Score']]

# Extract keywords
    key_phrases_response = comprehend.detect_key_phrases(Text=text, LanguageCode='en')
    key_phrases_data = key_phrases_response['KeyPhrases']
    key_phrases_df = pd.DataFrame(key_phrases_data)[['Text', 'Score']]

# HTML templates to display results
    html_template = """
    &amp;lt;h2&amp;gt;Sentiment Analysis Results:&amp;lt;/h2&amp;gt;
    {{ sentiment_table | safe }}
    &amp;lt;h2&amp;gt;Entities Recognition Results:&amp;lt;/h2&amp;gt;
    {{ entities_table | safe }}
    &amp;lt;h2&amp;gt;Key Phrases Detection Results:&amp;lt;/h2&amp;gt;
    {{ key_phrases_table | safe }}
    """

# Convert DataFrame to HTML
    sentiment_table = sentiment_df.to_html(index=False)
    entities_table = entities_df.to_html(index=False)
    key_phrases_table = key_phrases_df.to_html(index=False)

    return render_template_string(html_template, sentiment_table=sentiment_table,
                                  entities_table=entities_table, key_phrases_table=key_phrases_table)

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, debug=True)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now in the same way to create app.py file using &lt;code&gt;vim&lt;/code&gt; or &lt;code&gt;nano&lt;/code&gt; command and put the above code in the file, here we will also use &lt;code&gt;nano&lt;/code&gt; command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nano app.py&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;then past the codes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31zygya8kmw07pz3ysli.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31zygya8kmw07pz3ysli.png" alt=" " width="800" height="480"&gt;&lt;/a&gt;&lt;br&gt;
then exit the file from the keyboard by &lt;strong&gt;ctrl x&lt;/strong&gt; then &lt;strong&gt;y&lt;/strong&gt; (to save the file) then click enter&lt;/p&gt;

&lt;p&gt;The last step is to run the Flask application, which is done with the command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;python3 app.py&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;When you run &lt;strong&gt;app.py&lt;/strong&gt;, the terminal should display a URL as shown below:&lt;/p&gt;

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

&lt;p&gt;Now to view the results, we open the browser on our device and enter the URL link through the following steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go back to the instance and select it by the checkbox.&lt;/li&gt;
&lt;li&gt;Go to the Details and copy the Public IPv4 address.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Then paste the public IPv4 address with port 5000 into the browser and press Enter.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;The webpage is working successfully and all the results (sentiment analysis, extracted entities, key phrases) can be seen on the webpage where they are organized through our use of the Flask library.&lt;/p&gt;

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

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

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/comprehend/latest/dg/what-is.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/comprehend/latest/dg/what-is.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/zahraajawad/building-a-jupyter-notebook-environment-in-docker-for-data-analysis-on-aws-ec2-376i"&gt;https://dev.to/zahraajawad/building-a-jupyter-notebook-environment-in-docker-for-data-analysis-on-aws-ec2-376i&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://flask.palletsprojects.com/en/stable/" rel="noopener noreferrer"&gt;https://flask.palletsprojects.com/en/stable/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>coding</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Building a Go Application with Docker on AWS: Creating a RESTful Interface for Adding and Retrieving Items</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Sun, 27 Oct 2024 18:58:03 +0000</pubDate>
      <link>https://forem.com/zahraajawad/building-a-go-application-with-docker-on-aws-creating-a-restful-interface-for-adding-and-retrieving-items-54mi</link>
      <guid>https://forem.com/zahraajawad/building-a-go-application-with-docker-on-aws-creating-a-restful-interface-for-adding-and-retrieving-items-54mi</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While most Go applications are compiled into a single binary file, web applications also come with templates, assets, and configuration files; these can get out of sync and cause erroneous deployments.&lt;br&gt;
    Docker allows us to create a standalone image with everything our application needs to run. In this article, we will learn how to deploy a Go web application using Docker installed on an instance, and how Docker can help you improve your development workflow and deployment process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The steps we need will be as follows:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Launch an instance (your machine)to build Docker on and the Go application&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Install Docker in instance&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Installing Go in instance&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Create code files for your Go application&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;- Application Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Launch an instance (your machine)to build Docker on and the Go &lt;br&gt;
  application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can find the same steps of the launch and connect of instance described in the article:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/zahraajawad/building-a-jupyter-notebook-environment-in-docker-for-data-analysis-on-aws-ec2-376i"&gt;https://dev.to/zahraajawad/building-a-jupyter-notebook-environment-in-docker-for-data-analysis-on-aws-ec2-376i&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Make sure you choose the security group:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SSH-Port 22:&lt;/strong&gt; To access and connect to the instance using SSH &lt;br&gt;
protocol to manage the system remotely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HTTP-Port 8080:&lt;/strong&gt; To run the Go application on this port (8080) to access it from the Internet or local network, this port must be open.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;- Install Docker in our instance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The specific workflow architecture we will create uses Docker to provide an integrated workflow environment.&lt;br&gt;
   So after connecting to the instance via SSH and obtaining the root privilege, use the following command automation to install Docker:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - &amp;amp;&amp;amp; sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" &amp;amp;&amp;amp; sudo apt-get update &amp;amp;&amp;amp; apt-cache policy docker-ce&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker experience:&lt;/strong&gt; Run a simple test command &lt;code&gt;docker -v&lt;/code&gt; to check that Docker is working properly and to see the Docker version:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installing Go&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;You can install Go by downloading it from the official Go website &lt;a href="https://go.dev/dl/" rel="noopener noreferrer"&gt;https://go.dev/dl/&lt;/a&gt;&lt;br&gt;
&lt;code&gt;wget https://golang.org/dl/go1.20.linux-amd64.tar.gz&lt;br&gt;
sudo tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz&lt;br&gt;
echo 'export PATH=$PATH:/usr/local/go/bin' &amp;gt;&amp;gt; ~/.bash_profile&lt;br&gt;
source ~/.bash_profile&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0rx1bltegri0jp09nkm3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0rx1bltegri0jp09nkm3.png" alt=" " width="562" height="71"&gt;&lt;/a&gt;&lt;br&gt;
 where :&lt;br&gt;
&lt;code&gt;wget https://golang.org/dl/go1.20.linux-amd64.tar.gz&lt;/code&gt; is to download Go binary.&lt;/p&gt;

&lt;p&gt;and &lt;br&gt;
&lt;code&gt;sudo tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz&lt;/code&gt; is to extract the tarball to &lt;code&gt;/usr/local&lt;/code&gt;.&lt;br&gt;
and &lt;br&gt;
&lt;code&gt;echo 'export PATH=$PATH:/usr/local/go/bin' &amp;gt;&amp;gt; ~/.bash_profile&lt;/code&gt; to Update the PATH environment variable.&lt;br&gt;
and &lt;code&gt;source ~/.bash_profile&lt;/code&gt; to apply the changes made to the profile&lt;/p&gt;

&lt;p&gt;So after executing the commands and verifying the execution through the command &lt;code&gt;ls&lt;/code&gt; to show the downloaded files:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwjgd7bzw3atod7sjoc0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwjgd7bzw3atod7sjoc0.png" alt=" " width="561" height="321"&gt;&lt;/a&gt;&lt;br&gt;
Initialize the Go application with the following code:&lt;br&gt;
&lt;code&gt;go mod init my-go-app&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffr2h7ud8mc8qnicm7i71.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffr2h7ud8mc8qnicm7i71.png" alt=" " width="627" height="73"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we need to create a project folder by the command:&lt;br&gt;
 &lt;code&gt;mkdir &amp;lt;name of our work&amp;gt;&lt;/code&gt;&lt;br&gt;
Then change the current directory by the command :&lt;br&gt;
&lt;code&gt;cd &amp;lt;name of our work&amp;gt;&lt;/code&gt;&lt;br&gt;
so the execution is :&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Create code files for your Go application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The main.go file&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We create a new file called main.go which contains the following functions and codes which we will explain in detail and then we put all the codes in the main.go file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To import the necessary packages we use the code:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import (
    "encoding/json"
    "log"
    "net/http"
    "github.com/gorilla/mux"
    "os"
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;For the  data structure &lt;code&gt;item&lt;/code&gt;:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type Item struct {
    ID   int    `json:"id"`
    Name string `json:"name"`
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;where &lt;code&gt;item&lt;/code&gt;is a data structure containing an identifier (ID) and a name (Name). These fields are converted to JSON format using tags (&lt;code&gt;json:"id"&lt;/code&gt; and &lt;code&gt;json:"name"&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;items&lt;/code&gt; variable
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var items []Item
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;which is a slice of items stored in server memory.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Through the &lt;code&gt;main&lt;/code&gt; function the structures are arranged by reading the port (here it will be on port 8080) in addition to directing the various requests from retrieving or adding a new element and displaying a simple HTML page.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func main() {
    port := os.Getenv("PORT")
    if port == "" {
        port = "8080"
    }

    router := mux.NewRouter()
    router.HandleFunc("/items", getItems).Methods("GET")
    router.HandleFunc("/items", createItem).Methods("POST")
    router.HandleFunc("/", serveHome).Methods("GET")

    log.Printf("Server is running on port %s...\n", port)
    log.Fatal(http.ListenAndServe(":"+port, router))
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;The function &lt;code&gt;getItems&lt;/code&gt; returns a list of &lt;code&gt;items&lt;/code&gt; in JSON format. The content type in the header is set to &lt;code&gt;application/json&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func getItems(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Content-Type", "application/json")
    json.NewEncoder(w).Encode(items)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;createItem&lt;/code&gt; function adds a new item to the &lt;code&gt;items&lt;/code&gt; list. The data is read from the Request Body in JSON format, the item is assigned an ID based on the number of existing items, and the added item is returned as JSON.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func createItem(w http.ResponseWriter, r *http.Request) {
    var item Item
    json.NewDecoder(r.Body).Decode(&amp;amp;item)
    item.ID = len(items) + 1
    items = append(items, item)
    w.Header().Set("Content-Type", "application/json")
    json.NewEncoder(w).Encode(item)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;serveHome&lt;/code&gt; function displays a simple HTML page with a welcome message (&lt;strong&gt;Welcome to the Go App&lt;/strong&gt;) and links to access the data.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func serveHome(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Content-Type", "text/html")
    w.WriteHeader(http.StatusOK)
    w.Write([]byte(`
        &amp;lt;!DOCTYPE html&amp;gt;
        &amp;lt;html lang="en"&amp;gt;
        &amp;lt;head&amp;gt;
            &amp;lt;meta charset="UTF-8"&amp;gt;
            &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
            &amp;lt;title&amp;gt;Go App&amp;lt;/title&amp;gt;
        &amp;lt;/head&amp;gt;
        &amp;lt;body&amp;gt;
            &amp;lt;h1&amp;gt;Welcome to the Go App&amp;lt;/h1&amp;gt;
            &amp;lt;p&amp;gt;This is a simple API application.&amp;lt;/p&amp;gt;
            &amp;lt;p&amp;gt;Access &amp;lt;a href="/items"&amp;gt;/items&amp;lt;/a&amp;gt; to see all items.&amp;lt;/p&amp;gt;
        &amp;lt;/body&amp;gt;
        &amp;lt;/html&amp;gt;
    `))
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So the entire main.go file is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main

import (
    "encoding/json"
    "log"
    "net/http"
    "github.com/gorilla/mux"
    "os"
)

// Item represents the data structure we will be using
type Item struct {
    ID   int    `json:"id"`
    Name string `json:"name"`
}

var items []Item

func main() {
    port := os.Getenv("PORT")
    if port == "" {
        port = "8080"
    }

    router := mux.NewRouter()
    router.HandleFunc("/items", getItems).Methods("GET")
    router.HandleFunc("/items", createItem).Methods("POST")
    router.HandleFunc("/", serveHome).Methods("GET")

    log.Printf("Server is running on port %s...\n", port)
    log.Fatal(http.ListenAndServe(":"+port, router))
}

func getItems(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Content-Type", "application/json")
    json.NewEncoder(w).Encode(items)
}

func createItem(w http.ResponseWriter, r *http.Request) {
    var item Item
    json.NewDecoder(r.Body).Decode(&amp;amp;item)
    item.ID = len(items) + 1
    items = append(items, item)
    w.Header().Set("Content-Type", "application/json")
    json.NewEncoder(w).Encode(item)
}

func serveHome(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Content-Type", "text/html")
    w.WriteHeader(http.StatusOK)
    w.Write([]byte(`
        &amp;lt;!DOCTYPE html&amp;gt;
        &amp;lt;html lang="en"&amp;gt;
        &amp;lt;head&amp;gt;
            &amp;lt;meta charset="UTF-8"&amp;gt;
            &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
            &amp;lt;title&amp;gt;Go App&amp;lt;/title&amp;gt;
        &amp;lt;/head&amp;gt;
        &amp;lt;body&amp;gt;
            &amp;lt;h1&amp;gt;Welcome to the Go App&amp;lt;/h1&amp;gt;
            &amp;lt;p&amp;gt;This is a simple API application.&amp;lt;/p&amp;gt;
            &amp;lt;p&amp;gt;Access &amp;lt;a href="/items"&amp;gt;/items&amp;lt;/a&amp;gt; to see all items.&amp;lt;/p&amp;gt;
        &amp;lt;/body&amp;gt;
        &amp;lt;/html&amp;gt;
    `))
}

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

&lt;/div&gt;



&lt;p&gt;Now through the command &lt;code&gt;vim&lt;/code&gt; or &lt;code&gt;nano&lt;/code&gt; create the main.go file and  put above code in the file, here we will use the command &lt;code&gt;nano&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nano main.go&lt;/code&gt;&lt;/p&gt;

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

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

&lt;p&gt;then exit the file from the keyboard by &lt;strong&gt;ctrl x&lt;/strong&gt; then &lt;strong&gt;y&lt;/strong&gt; (to save the file) then click &lt;strong&gt;enter&lt;/strong&gt;&lt;/p&gt;

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

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

&lt;p&gt;Is a text document that contains all the commands a user could call on the command line to assemble an image.&lt;br&gt;
Dockerfile can build images automatically by reading the instructions from a Dockerfile.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a Dockerfile:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;Dockerfile&lt;/code&gt; with build instructions is required to build a container image with Docker.&lt;br&gt;
We create a Dockerfile and add the following code in the same way as before through the command &lt;code&gt;nano Dockerfile&lt;/code&gt;:&lt;/p&gt;

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

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

&lt;p&gt;&lt;code&gt;Dockerfile&lt;/code&gt; command details can be found on the docker docs homepage &lt;a href="https://docs.docker.com/guides/golang/build-images/" rel="noopener noreferrer"&gt;https://docs.docker.com/guides/golang/build-images/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we have prepared the Dockerfile, it is time to build a Docker image for the Go application. The image can be made from the official Docker images which are:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker build -t my-go-app .&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft35z7tsbhj56coy6uuk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft35z7tsbhj56coy6uuk0.png" alt=" " width="800" height="379"&gt;&lt;/a&gt;&lt;br&gt;
The image is successfully built, and to make sure of the build by using the command: &lt;br&gt;
&lt;code&gt;docker images&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Then to run the container after building the image, we use:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker run -p 8080:8080 my-go-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;where 8080 is the port of the web servers, so the execution run is:&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Application Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Test the Go application by the &lt;code&gt;curl&lt;/code&gt; command&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To test whether the Go application works properly through the &lt;code&gt;curl&lt;/code&gt; command by:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl http://localhost:8080/items&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;or&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl http://&amp;lt;public IPv4 address of our instance&amp;gt;:8080/items&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;the execution is &lt;strong&gt;null&lt;/strong&gt;, which means the application is working but we have no data yet. &lt;/p&gt;

&lt;p&gt;To add an item, by the command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -X POST -H "Content-Type: application/json" -d '{"name": "item"}' http://localhost:8080/items&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;or&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -X POST -H "Content-Type: application/json" -d '{"name": "item"}' http://&amp;lt;public IPv4 address of our instance&amp;gt;:8080/items&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;so the execution of adding:&lt;/p&gt;

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

&lt;p&gt;we can add another item:&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;- Test the Go application by the web page&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To test whether the Go application works properly through the web page, the following steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go back to the instance and select it by the checkbox.&lt;/li&gt;
&lt;li&gt;Go to the Details and copy the Public IPv4 address.&lt;/li&gt;
&lt;li&gt;Paste the public IPv4 address with port 8080 into the browser and press 
Enter.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;The web page is working and when we press on &lt;strong&gt;items&lt;/strong&gt; on the page we obtain the items that add by the &lt;code&gt;curl&lt;/code&gt; command.&lt;/p&gt;

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

&lt;p&gt;Or can press the checkbox of Pretty-print:&lt;/p&gt;

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

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

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

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/zahraajawad/building-a-jupyter-notebook-environment-in-docker-for-data-analysis-on-aws-ec2-376i"&gt;https://dev.to/zahraajawad/building-a-jupyter-notebook-environment-in-docker-for-data-analysis-on-aws-ec2-376i&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://semaphoreci.com/community/tutorials/how-to-deploy-a-go-web-application-with-docker" rel="noopener noreferrer"&gt;https://semaphoreci.com/community/tutorials/how-to-deploy-a-go-web-application-with-docker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hub.docker.com/_/golang" rel="noopener noreferrer"&gt;https://hub.docker.com/_/golang&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.docker.com/guides/golang/build-images/" rel="noopener noreferrer"&gt;https://docs.docker.com/guides/golang/build-images/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/gorilla/mux" rel="noopener noreferrer"&gt;https://github.com/gorilla/mux&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>docker</category>
      <category>go</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Building a Jupyter Notebook Environment in Docker for Data Analysis on AWS EC2</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Mon, 30 Sep 2024 20:37:36 +0000</pubDate>
      <link>https://forem.com/zahraajawad/building-a-jupyter-notebook-environment-in-docker-for-data-analysis-on-aws-ec2-376i</link>
      <guid>https://forem.com/zahraajawad/building-a-jupyter-notebook-environment-in-docker-for-data-analysis-on-aws-ec2-376i</guid>
      <description>&lt;p&gt;&lt;strong&gt;Outline&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is Jupyter Notebook&lt;/li&gt;
&lt;li&gt;Docker in the AWS environment with the Jupyter Notebook&lt;/li&gt;
&lt;li&gt;Install Jupyter Notebook using Docker in an AWS environment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What is Jupyter Notebook&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JupyterLab: A Next-Generation Notebook Interface JupyterLab is the latest web-based interactive development environment for notebooks, code, and data. Its flexible interface allows users to configure and arrange workflows in data science, scientific computing, computational journalism, and machine learning. A modular design invites extensions to expand and enrich functionality.&lt;/p&gt;

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

&lt;p&gt;JupyterLab is the latest web-based interactive development environment for notebooks, code, and data. Its flexible interface allows users to configure and arrange workflows in data science, scientific computing, computational journalism, and machine learning. A modular design invites extensions to expand and enrich functionality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker in the AWS environment with the Jupyter Notebook&lt;/strong&gt;&lt;br&gt;
In this work, we will take practical and distinctive advantage of the uses of Docker installed in the AWS environment by building and preparing an environment for data analysis using Jupyter Notebook inside a Docker container and running it on AWS EC2, as it provides many important benefits, especially in the fields of data analysis and data science. These benefits include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Portability and Replication&lt;/strong&gt;&lt;br&gt;
Docker containers ensure that your work environment is consistent across different systems. You can easily move the container between different machines without worrying about system compatibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Ease of Setup and Operation&lt;/strong&gt;&lt;br&gt;
With AWS EC2, you can quickly set up a new instance and launch a Docker container. This reduces the time and effort required to set up a data analysis environment, allowing you to focus on the actual work instead of setting up the infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Easily Scalable&lt;/strong&gt;&lt;br&gt;
AWS EC2 provides the flexibility to scale resources as needed. You can increase or decrease the size of the instance based on your analysis requirements, saving operational costs and ensuring optimal performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Remote Access and Collaboration&lt;/strong&gt;&lt;br&gt;
Jupyter Notebook provides an interactive web interface that can be accessed from anywhere. This facilitates collaboration between teams, as multiple users can access the same environment and work on the same projects in real-time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Integration with Big Data Tools&lt;/strong&gt;&lt;br&gt;
You can integrate Jupyter Notebook with big data tools like Apache Spark and Hadoop, making it easier to analyze and visualize big data.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data Security
With AWS, you can use advanced security features like Identity and Access Management (IAM), Virtual Private Networks (VPC), and encryption, ensuring your sensitive data is protected.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Install Jupyter Notebook using Docker in an AWS environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To install Jupyter Notebook using Docker in an AWS environment, follow these steps:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 "Launch Instance"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When logging into the AWS account, we select the EC2 service through Services or by the search box:&lt;/p&gt;

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

&lt;p&gt;Click on &lt;strong&gt;Launch instance&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Under &lt;strong&gt;Name and tags&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Enter a name to identify your instance, For this tutorial, name the instance (Jupyter Notebook)&lt;/p&gt;

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

&lt;p&gt;Under &lt;strong&gt;Application and OS Images&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;From Quick Start, choose an AMI that meets your web server needs&lt;br&gt;
Here we choose Ubuntu (which is free tier eligible)&lt;/p&gt;

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

&lt;p&gt;Under &lt;strong&gt;Instance type&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Choose the type of instance, here we choose t2.micro(which is a free tier eligible).&lt;/p&gt;

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

&lt;p&gt;Under &lt;strong&gt;Key pair (login)&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Choose the key pair&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fto8vx18cooeidcqxi1j9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fto8vx18cooeidcqxi1j9.png" alt=" " width="800" height="316"&gt;&lt;/a&gt;&lt;br&gt;
or create new key pair:&lt;br&gt;
Give a name to the key pair, then click &lt;strong&gt;Create key pair&lt;/strong&gt;:&lt;/p&gt;

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

&lt;p&gt;Under &lt;strong&gt;Network settings&lt;/strong&gt;: &lt;strong&gt;under Firewall (security groups)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Choose to Create security groups&lt;br&gt;
&lt;strong&gt;To Allow SSH traffic&lt;/strong&gt; by clicking on the check box&lt;/p&gt;

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

&lt;p&gt;Leave all other configurations as they are (default settings)&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Summary&lt;/strong&gt; panel, review your instance configuration and then choose &lt;strong&gt;Launch instance&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;Successfully initiated launch of instance and to see the instance click on the ID:&lt;/p&gt;

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

&lt;p&gt;Your instance will first be Pending, and will then go into the Running state.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 2: "Connect to the instance"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To connect to your instance, select the instance and choose Connect.&lt;/p&gt;

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

&lt;p&gt;There are many ways to connect to ec2, here we will choose the SSH client to connect.&lt;br&gt;
After selecting the "SSH Client" section, copy and execute the following commands in the terminal as per the following steps:&lt;/p&gt;

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

&lt;p&gt;Open Terminal (here we use Git Bash)&lt;/p&gt;

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

&lt;p&gt;Change the directory with the cd command (change directory), where you have downloaded your pem file(key pair).&lt;/p&gt;

&lt;p&gt;In this article, the pem file is stored in the downloads folder.&lt;/p&gt;

&lt;p&gt;Execute the &lt;code&gt;cd&lt;/code&gt; command to change the path to the location of the encryption key&lt;br&gt;
cd Download/&lt;/p&gt;

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

&lt;p&gt;Execute the following commands sequentially&lt;/p&gt;

&lt;p&gt;1-&lt;code&gt;Chmod 400 [key pair name].pem&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;2-&lt;code&gt;ssh -i /path/key-pair-name.pem instance-user-name@instance-public-dns-name&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;After the command is executed you will be prompted to type “Yes” to continue with the connection&lt;/p&gt;

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

&lt;p&gt;And that’s it! Now we’re logged in to our AWS instance.&lt;/p&gt;

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

&lt;p&gt;Now We get root permission by executing the &lt;code&gt;sudo -i&lt;/code&gt; command&lt;/p&gt;

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

&lt;p&gt;Executing the command "sudo -i" means booting as root on Linux. The main feature of this command is that it gives you full admin (root user) privileges, allowing you to perform commands and operations that require root user privileges.&lt;/p&gt;

&lt;p&gt;We update the repositories through the command:&lt;br&gt;
&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade -y&lt;/code&gt;&lt;/p&gt;

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

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

&lt;p&gt;&lt;strong&gt;Docker installation:&lt;/strong&gt;&lt;br&gt;
I used Docker installed on an instance in the AWS account, and this was explained in the article:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/zahraajawad/docker-basics-with-some-of-its-commands-and-how-to-install-docker-by-aws-7b6"&gt;https://dev.to/zahraajawad/docker-basics-with-some-of-its-commands-and-how-to-install-docker-by-aws-7b6&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Create a Dockerfile&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a Dockerfile describing how to build the image. This file contains the instructions necessary to install and configure the application within the image.&lt;br&gt;
we can do it by the command(nano):&lt;br&gt;
&lt;code&gt;nano Dockerfile&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Write the instructions necessary to install and configure the application:&lt;/p&gt;

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

&lt;p&gt;Then follow the steps to store and exit the file:&lt;br&gt;
&lt;strong&gt;Ctrl+x&lt;/strong&gt; : to exit&lt;br&gt;
&lt;strong&gt;Y&lt;/strong&gt;: to save then &lt;strong&gt;enter&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4sfwg2uiz04zwg38l6jb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4sfwg2uiz04zwg38l6jb.png" alt=" " width="800" height="111"&gt;&lt;/a&gt;&lt;br&gt;
Now to build the Jupyter Notebook image we execute the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker build -t my-jupyter-notebook .&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Image built successfully&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fovsu2hlbeptzauno2sbo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fovsu2hlbeptzauno2sbo.png" alt=" " width="562" height="335"&gt;&lt;/a&gt;&lt;br&gt;
To make sure, we execute the command:&lt;br&gt;
&lt;code&gt;docker images&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;run the container using the following command:&lt;br&gt;
&lt;code&gt;docker run -d -p 8888:8888 my-jupyter-notebook&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Access to Jupyter Notebook&lt;/strong&gt;&lt;br&gt;
To access Jupyter Notebook, we must open its port, and this is done through the following steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go back to the instance and select it by clicking on the checkbox, then go to the &lt;strong&gt;security&lt;/strong&gt; box&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Open the security group by clicking on it&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Choose the &lt;strong&gt;Inbound rules&lt;/strong&gt; then &lt;strong&gt;edit Inbound rules&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Add Rule&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Enter the rule
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fngoyns0zki5temis8250.png" alt=" " width="688" height="278"&gt;
&lt;strong&gt;Note:&lt;/strong&gt; In practice, it is not preferable to leave the state &lt;strong&gt;0.0.0.0/0&lt;/strong&gt; This is easy to hack, but we are here to learn the labs and the building process.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, Go back to the instance and select it, then go to the &lt;strong&gt;Details&lt;/strong&gt; and copy the &lt;strong&gt;Public IPv4 address&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Paste the public IPv4 address with port 8888 into the browser and press Enter &lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl5lrzriudgqqdc06oosb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl5lrzriudgqqdc06oosb.png" alt=" " width="800" height="370"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Jupyter Notebook has been successfully built and you can work on it&lt;/strong&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://jupyter.or" rel="noopener noreferrer"&gt;https://jupyter.or&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.dataquest.io/blog/jupyter-notebook-t" rel="noopener noreferrer"&gt;https://www.dataquest.io/blog/jupyter-notebook-t&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://jupyter-notebook.readthedocs.io/en/stable/notebook.html" rel="noopener noreferrer"&gt;https://jupyter-notebook.readthedocs.io/en/stable/notebook.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/zahraajawad/setting-up-a-secure-wazuh-environment-by-aws-ec2-487o"&gt;https://dev.to/zahraajawad/setting-up-a-secure-wazuh-environment-by-aws-ec2-487o&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/zahraajawad/docker-basics-with-some-of-its-commands-and-how-to-install-docker-by-aws-7b6"&gt;https://dev.to/zahraajawad/docker-basics-with-some-of-its-commands-and-how-to-install-docker-by-aws-7b6&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>docker</category>
      <category>cloudcomputing</category>
      <category>community</category>
    </item>
    <item>
      <title>Setting Up a Secure Wazuh Environment by AWS EC2</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Sun, 16 Jun 2024 21:52:01 +0000</pubDate>
      <link>https://forem.com/zahraajawad/setting-up-a-secure-wazuh-environment-by-aws-ec2-487o</link>
      <guid>https://forem.com/zahraajawad/setting-up-a-secure-wazuh-environment-by-aws-ec2-487o</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Wazuh is an open-source security platform that aims to help organizations monitor and manage security incidents, detect threats, and ensure compliance with security regulations. It provides capabilities for intrusion detection, log analysis, vulnerability detection, and threat intelligence, wazuh is trusted and used by thousands of organizations around the world. With its powerful features and flexible capabilities, it has become a preferred choice for those looking for a reliable and flexible open-source security platform. Wazuh is a powerful security platform that combines threat detection and response capabilities and is characterized by the ability to integrate and customize to meet the needs of different organizations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features of Wazuh&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Protect endpoints and cloud workloads:&lt;/strong&gt; Wazuh provides continuous protection for on-ground and cloud-based environments, ensuring environments are protected from potential threats.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Integration and scalability:&lt;/strong&gt; Wazuh can integrate with other security tools and expand its capabilities based on an organization's needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security monitoring and log data analysis:&lt;/strong&gt; Wazuh enables effective threat detection and response through log data analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Integration Monitoring and Incident Response:&lt;/strong&gt; Wazuh supports regulatory compliance monitoring and cloud security.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Tools, Log Control, and Incident Control:&lt;/strong&gt; Wazuh provides tools for security, incident control, and log control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation Wazuh by AWS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 "Launch Instance"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When logging into the AWS account, we select the EC2 service through Services or by the search box:&lt;/p&gt;

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

&lt;p&gt;Click on &lt;strong&gt;Launch instance&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Under &lt;strong&gt;Name and tags&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enter a name to identify your instance, For this tutorial, name the instance (Wazuh)&lt;/p&gt;

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

&lt;p&gt;Under Application and OS Images:&lt;/p&gt;

&lt;p&gt;From &lt;strong&gt;Quick Start&lt;/strong&gt;, choose an AMI that meets your web server needs&lt;br&gt;
Here we choose Ubuntu (which is free tier eligible)&lt;/p&gt;

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

&lt;p&gt;Under &lt;strong&gt;Instance type&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Choose the type of instance, here we choose &lt;strong&gt;t2.medium&lt;/strong&gt;.(&lt;strong&gt;It is recommended that the lowest specifications be 2CPU and 4GiB, which are available in the t2.medium or higher instance&lt;/strong&gt;).&lt;/p&gt;

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

&lt;p&gt;Under &lt;strong&gt;Key pair (login)&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Choose the key pair&lt;/p&gt;

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

&lt;p&gt;or create new key pair:&lt;br&gt;
Give a name to the key pair, then click &lt;strong&gt;Create key pair&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Under &lt;strong&gt;Network settings&lt;/strong&gt;: under &lt;strong&gt;Firewall (security groups)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Choose to Create security groups&lt;br&gt;
&lt;strong&gt;To Allow SSH traffic&lt;/strong&gt; by clicking on the check box&lt;br&gt;
&lt;strong&gt;To Allow HTTPS traffic&lt;/strong&gt; from the internet by clicking on the check box&lt;/p&gt;

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

&lt;p&gt;Leave all other configurations as they are (default settings)&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Summary&lt;/strong&gt; panel, review your instance configuration and then choose &lt;strong&gt;Launch instance&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;Successfully initiated launch of instance and to see the instance click on the ID:&lt;/p&gt;

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

&lt;p&gt;Your instance will first be Pending, and will then go into the Running state.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 2: "Connect to the instance"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To connect to your instance, select the instance and choose &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;There are many ways to connect to ec2, here we will choose the &lt;strong&gt;SSH client&lt;/strong&gt; to connect.&lt;br&gt;
After selecting the &lt;strong&gt;"SSH Client"&lt;/strong&gt; section, copy and execute the following commands in the terminal as per the following steps:&lt;/p&gt;

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

&lt;p&gt;Open Terminal (here we use Git Bash)&lt;/p&gt;

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

&lt;p&gt;Change the directory with the cd command (change directory), where you have downloaded your pem file(key pair).&lt;/p&gt;

&lt;p&gt;In this article, the pem file is stored in the downloads folder.&lt;/p&gt;

&lt;p&gt;Execute the &lt;strong&gt;cd&lt;/strong&gt; command to change the path to the location of the encryption key&lt;br&gt;
&lt;code&gt;cd Download/&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Execute the following commands sequentially&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Chmod 400 [key pair name].pem&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ssh -i /path/key-pair-name.pem instance-user-name@instance-public-dns-name&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;After the command is executed you will be prompted to type “Yes” to continue with the connection&lt;/p&gt;

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

&lt;p&gt;And that’s it! Now we’re logged in to our AWS instance.&lt;/p&gt;

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

&lt;p&gt;Before installing Wazuh on an EC2 instance:&lt;/p&gt;

&lt;p&gt;We get root permission by executing the &lt;code&gt;sudo -i&lt;/code&gt; command&lt;/p&gt;

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

&lt;p&gt;Executing the command "sudo -i" means booting as root on Linux. The main feature of this command is that it gives you full admin (root user) privileges, allowing you to perform commands and operations that require root user privileges.&lt;/p&gt;

&lt;p&gt;Step 3 "Install Wazuh"&lt;/p&gt;

&lt;p&gt;Now to install Wazuh, execute the command &lt;code&gt;curl -sO https://packages.wazuh.com/4.7/wazuh-install.sh&amp;amp;&amp;amp;sudo bash ./wazuh-install.sh -a -i&lt;/code&gt; &lt;/p&gt;

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

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

&lt;p&gt;After some time has passed, the Wazuh installation is completed and we can log in using the username and password that we obtained with the installation:&lt;/p&gt;

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

&lt;p&gt;Step 4 "login Wazuh"&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Return to the AWS account and click on the instance&lt;/li&gt;
&lt;li&gt;Then click on the details box&lt;/li&gt;
&lt;li&gt;Then click on the public IPV4 address to open in a browser.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;After opening the public IPV4 address in the browser, the following page appears, so we click on &lt;strong&gt;Advanced&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;then click below:&lt;/p&gt;

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

&lt;p&gt;The wazuh construction steps have been completed successfully&lt;/p&gt;

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

&lt;p&gt;We now login using the username and password that were obtained during the installation process previously:&lt;/p&gt;

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

&lt;p&gt;You have successfully logged into Wazuh&lt;/p&gt;

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

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

&lt;p&gt;&lt;a href="https://documentation.wazuh.com/current/installation-guide/wazuh-server/index.html" rel="noopener noreferrer"&gt;https://documentation.wazuh.com/current/installation-guide/wazuh-server/index.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/zahraajawad/our-wordpress-site-installation-by-aws-34jn"&gt;https://dev.to/zahraajawad/our-wordpress-site-installation-by-aws-34jn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloudcomputing</category>
      <category>cloudnative</category>
      <category>community</category>
    </item>
    <item>
      <title>BUILD, TAG, AND PUSH DOCKER IMAGES TO DOCKER HUB AND AMAZON ELASTIC CONTAINER REGISTRY</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Fri, 22 Sep 2023 23:03:09 +0000</pubDate>
      <link>https://forem.com/zahraajawad/build-tag-and-push-docker-images-to-docker-hub-and-amazon-elastic-container-registry-4hbm</link>
      <guid>https://forem.com/zahraajawad/build-tag-and-push-docker-images-to-docker-hub-and-amazon-elastic-container-registry-4hbm</guid>
      <description>&lt;p&gt;&lt;strong&gt;HEADLINES&lt;/strong&gt;&lt;br&gt;
 Docker Image Tag&lt;br&gt;
 Tag an Image by Docker tag Command&lt;br&gt;
 Simple steps to create an image and tag it&lt;br&gt;
 Upload the image to Docker Hub&lt;br&gt;
 Amazon Elastic Container Registry (ECR)&lt;br&gt;
 Upload the image to Amazon Elastic Container Registry (ECR)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Image Tag&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;In Docker, a "Tag" is an identifying tag attached to a Docker image to distinguish it from different versions of the same image or to specify other uses for it. The tag is appended to the image name with a validated comma (:) to create a unique name for this version or interpretation of the image. For example, if you are building a Docker image for a web application, you can assign a Tag to that image to tag different versions of the application.&lt;/p&gt;

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

&lt;p&gt;• &lt;strong&gt;SOURCE_IMAGE&lt;/strong&gt; is the name of the image you want to tag.&lt;br&gt;
• &lt;strong&gt;TAG&lt;/strong&gt; is the tag associated with the source image (optional).&lt;br&gt;
• &lt;strong&gt;TARGET_IMAGE&lt;/strong&gt; is the new name you want to give to the image.&lt;br&gt;
• &lt;strong&gt;TAG&lt;/strong&gt; is the new tag you want to assign to the image (optional).&lt;/p&gt;

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

&lt;p&gt;In this example: the image named my-image with the tag latest is being tagged as my-image:v1.0 More than one tag can refer to the same image. Docker images can contain multiple tags pointing to the layers of the same image, allowing you to easily manage versions and references. Each image has a tag, so when the image is pulled without any tag, it pulls the latest. When specifying the tag, it removes the delimiter from it, for example, redis:alpain.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Tag an Image by Docker &lt;code&gt;tag&lt;/code&gt; Command&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can explicitly tag the image with the Docker tag command. Tagging an image creates an alias for the name of the image. Here we will explore the way to tag an image. &lt;br&gt;
&lt;strong&gt;Tag without name, by the command:&lt;/strong&gt; &lt;br&gt;
&lt;code&gt;docker tag [image] [user name of docker hub/image]&lt;/code&gt; &lt;br&gt;
For example: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpk2bjtsxqleeqy8e24ak.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpk2bjtsxqleeqy8e24ak.png" alt=" " width="252" height="19"&gt;&lt;/a&gt;&lt;br&gt;
When we run the &lt;code&gt;docker Images&lt;/code&gt; command, we show that the image is tagged and takes the (latest) name because it has no name given.&lt;/p&gt;

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

&lt;p&gt;Note: I used Docker installed on an instance in the AWS account, and this was explained in the article:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/zahraajawad/docker-basics-with-some-of-its-commands-and-how-to-install-docker-by-aws-7b6"&gt;https://dev.to/zahraajawad/docker-basics-with-some-of-its-commands-and-how-to-install-docker-by-aws-7b6&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tag with name, by the command:&lt;/strong&gt; &lt;br&gt;
&lt;code&gt;docker tag [image] [user name of docker hub/image]:[tag name]&lt;/code&gt; &lt;br&gt;
For example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7t5ox43xihdef6a5gn8y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7t5ox43xihdef6a5gn8y.png" alt=" " width="277" height="17"&gt;&lt;/a&gt;&lt;br&gt;
And when we run the &lt;code&gt;docker Images&lt;/code&gt; command, we show that the image is tagged and takes the name that is specified to it.&lt;/p&gt;

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

&lt;p&gt;Now, to upload the image to Docker Hub (the account must be available on Docker Hub to be able to upload the image), you must first login to your Docker Hub account with the command: &lt;br&gt;
&lt;code&gt;docker login&lt;/code&gt; &lt;/p&gt;

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

&lt;p&gt;Then enter your Docker Hub username and password: &lt;/p&gt;

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

&lt;p&gt;Now the image can be uploaded to Docker Hub by command: &lt;br&gt;
&lt;code&gt;docker push [username/image]&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;To make sure the image has been pushed to Docker Hub, go to Account and note that the image has been pushed.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Dockerfile&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mind you, the application is still running on your machine, and you don’t have a Docker image yet. Of course, there are no magic wands you can wave at your app and turn it into a Docker container all of a sudden. You’ve got to write a Dockerfile and build an image out of it.&lt;br&gt;
Docker’s official docs define Dockerfile as “a text document that contains all the commands a user could call on the command line to assemble an image.” Now that you know what a Dockerfile is, it’s time to write one.&lt;br&gt;
Docker builds images by reading instructions in dockerfiles. A docker instruction has two components: instruction and argument.&lt;br&gt;
A docker instruction can be written as :&lt;br&gt;
&lt;code&gt;RUN npm install&lt;br&gt;
&lt;/code&gt;“RUN” in the instruction and “npm install” is the argument. There are many docker instructions but below are some of the docker instructions you will come across often and the explanation. Mind you, we’ll use some of them in this post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Instructions&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Simple steps to create an image and tag it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• &lt;strong&gt;Create a Dockerfile&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Create a Dockerfile describing how to build the image. This file contains the instructions necessary to install and configure the application within the image.&lt;br&gt;
 we can do it by the command: &lt;br&gt;
&lt;code&gt;mkdir dockerfile&lt;/code&gt; &lt;/p&gt;

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

&lt;p&gt;Then the command &lt;code&gt;cd&lt;/code&gt; to enter the directory:&lt;/p&gt;

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

&lt;p&gt;Then by the command &lt;code&gt;nano&lt;/code&gt; write the instructions needed to install and configure the application within the image&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxkugczqv1mqndkar9zx3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxkugczqv1mqndkar9zx3.png" alt=" " width="560" height="323"&gt;&lt;/a&gt;&lt;br&gt;
This file uses the latest Ubuntu image as a base and prints a simple sentence. After writing the necessary instructions for the image “&lt;strong&gt;This Is My Image!&lt;/strong&gt;” . Then follow the steps to store and exit the file: &lt;br&gt;
Ctrl+x : to exit &lt;br&gt;
Y : to save then enter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building images:&lt;/strong&gt; &lt;br&gt;
Now build the image using the docker build command and command &lt;code&gt;tag&lt;/code&gt; to add a name to the image &lt;br&gt;
&lt;code&gt;docker build - -tag [Image name]&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;The image is being built&lt;/p&gt;

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

&lt;p&gt;After completing building the image, it can be displayed with some details through the &lt;code&gt;docker Images&lt;/code&gt; command.&lt;/p&gt;

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

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

&lt;p&gt;To run the image by the command &lt;code&gt;docker run [image]&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;My Image implementation:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fplmy2iobrz9qjg025k8m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fplmy2iobrz9qjg025k8m.png" alt=" " width="126" height="34"&gt;&lt;/a&gt;&lt;br&gt;
In the same manner as previously described, pushing to the Docker Hub can be made by logging into your Docker Hub account by the command &lt;code&gt;docker login&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Upload the image to Docker Hub:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;After active login, you can upload the image to Docker Hub using the docker push command. Replace your docker-hub-username with your username on Docker Hub and your-image-name with the name you gave the image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5tbt5pd7wk53xg53haep.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5tbt5pd7wk53xg53haep.png" alt=" " width="412" height="40"&gt;&lt;/a&gt;&lt;br&gt;
First, Execute the following commend: &lt;/p&gt;

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

&lt;p&gt;and then executing a push command:&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;To confirm the upload:&lt;/strong&gt; &lt;br&gt;
After the upload is complete, you will be able to see the image on Docker Hub in your personal account, and everyone else can download the image from Docker Hub using docker pull using the full name of the image: docker.io/your-docker-hub-username/your-image-name. To make sure the image has been pushed to Docker Hub, go to Account and note that the image has been pushed.&lt;/p&gt;

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

&lt;p&gt;More elements can be added to your Docker image definition to achieve more functionality. That is, you can build your image to achieve the functionality you need and build and test it well to make sure it works as expected. Here are some examples of what you can add: Install additional packages or software: You can install additional packages or software within the image using commands such as apt-get for Ubuntu systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyptj19judsdmfpowy202.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyptj19judsdmfpowy202.png" alt=" " width="441" height="76"&gt;&lt;/a&gt;&lt;br&gt;
Copy files to the image: You can copy files to the image using the copy instructions. &lt;/p&gt;

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

&lt;p&gt;Define environmental variables: You can set environmental variables to configure the behavior of the image. &lt;/p&gt;

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

&lt;p&gt;Run additional commands: You can set the commands that you want to be executed when the image is played.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Amazon Elastic Container Registry (ECR)&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Amazon Elastic Container Registry (Amazon ECR) is a fully managed container registry offering high-performance hosting, so you can reliably deploy application images and artifacts anywhere. &lt;/p&gt;

&lt;p&gt;Use cases:&lt;br&gt;
• Manage software vulnerabilities&lt;br&gt;
• Streamline your deployment workloads&lt;br&gt;
• Manage image lifecycle policies&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Upload the image to Amazon Elastic Container Registry (ECR):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Amazon Elastic Container Registry (ECR) is a managed AWS Docker registry service. In this topic, we will use the Docker CLI to push an image into Amazon ECR.&lt;/p&gt;

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

&lt;p&gt;Here I am using Docker installed on an instance in my AWS account So, the first step here to upload the image to Amazon Elastic Container Registry (ECR) is to install the AWS Command Line Interface (CLI) to do the configuration with my AWS account.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;To do this we follow the following steps:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Install awscli in my instance by the commands: &lt;br&gt;
&lt;code&gt;Sudo apt update&lt;/code&gt; (To update the sudo library for Linux systems use APT) &lt;br&gt;
Then the following command to install the awscli: &lt;br&gt;
&lt;code&gt;Sudo apt install awscli&lt;/code&gt;&lt;br&gt;
• After the installation process, we perform the configuration process with the AWS account through the command &lt;code&gt;aws configure&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;• Enter the user's access key, secret access key, and the AWS account region in which the repository will be built.&lt;/p&gt;

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

&lt;p&gt;• Create a repository in ECR to which you will upload the image by the command: &lt;br&gt;
&lt;code&gt;aws ecr create-repository --repository-name my-repo-name --region your- region&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;To confirm that the repository has been created (ECR), go to Amazon Elastic Container Registry in your AWS account, and we will notice that the repository has been created successfully. &lt;/p&gt;

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

&lt;p&gt;When you open the warehouse it is empty.&lt;/p&gt;

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

&lt;p&gt;Now return to the command line interface to log in to the repository and upload our image.&lt;br&gt;
• Log in to ECR to obtain a permit by the command: &lt;br&gt;
&lt;code&gt;aws ecr get-login-password --region your-region | docker login --username AWS --password-stdin your-account-id.dkr.ecr.your-region.amazonaws.com&lt;/code&gt; &lt;/p&gt;

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

&lt;p&gt;Login Succeeded&lt;/p&gt;

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

&lt;p&gt;• Describe the image using the address of the ECR repository you created: &lt;br&gt;
&lt;code&gt;docker tag my-image:latest your-account-id.dkr.ecr.your- region.amazonaws.com/my-repo-name:latest&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;• Now use the docker command to &lt;code&gt;push&lt;/code&gt; the image to the ECR repository:&lt;br&gt;
docker push your-account-id.dkr.ecr.your-region.amazonaws.com/my-repo-name:latest&lt;/p&gt;

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

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

&lt;p&gt;• The image has been successfully uploaded to the repository in your AWS account.You can confirm by going to the repository in the account and noting the presence of the image.&lt;/p&gt;

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

&lt;p&gt;References:&lt;br&gt;
• &lt;a href="https://dev.to/zahraajawad/docker-basics-with-some-of-its-commands-and-how-to-install-docker-by-aws-7b6"&gt;https://dev.to/zahraajawad/docker-basics-with-some-of-its-commands-and-how-to-install-docker-by-aws-7b6&lt;/a&gt;&lt;br&gt;
• &lt;a href="https://stackify.com/docker-build-a-beginners-guide-to-building-docker-images/" rel="noopener noreferrer"&gt;https://stackify.com/docker-build-a-beginners-guide-to-building-docker-images/&lt;/a&gt;&lt;br&gt;
• &lt;a href="https://aws.amazon.com/ecr/" rel="noopener noreferrer"&gt;https://aws.amazon.com/ecr/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Docker Basics with some of its Commands and how to Install Docker by AWS</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Fri, 18 Aug 2023 23:10:49 +0000</pubDate>
      <link>https://forem.com/zahraajawad/docker-basics-with-some-of-its-commands-and-how-to-install-docker-by-aws-7b6</link>
      <guid>https://forem.com/zahraajawad/docker-basics-with-some-of-its-commands-and-how-to-install-docker-by-aws-7b6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Outline&lt;/strong&gt;&lt;br&gt;
What do we mean by Docker?&lt;br&gt;
How Docker works&lt;br&gt;
Docker properties&lt;br&gt;
Why use Docker&lt;br&gt;
Some important terms in Docker&lt;br&gt;
Install Docker on an Amazon Web Services (AWS) instance&lt;br&gt;
Some basic commands for Docker&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What do we mean by Docker?&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Docker is an open-source platform used to build, run and manage applications inside containers. Where containers represent an isolated and lightweight environment that contains all the components needed to run a specific application, including source code, settings, libraries, tools, and the file system, and this makes them very similar to virtual machines (Virtual Machines), but they work more efficiently and quickly. Docker technology enables developers to uniformly develop and port applications between development, test, and production environments, reducing compatibility and dependency issues on specific environments. Developers can define the architecture of their applications using configuration files that define the required environment and settings, and then use Docker to create containers based on these definitions.&lt;/p&gt;

&lt;p&gt;And it downloads to your operating system, be it Windows, Linux, Mac, or any other operating system&lt;br&gt;
So, Docker is a tool through which containers are controlled.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;How Docker works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Docker works by providing a standard way to run your code. Docker is an operating system for containers. Similar to how a virtual machine virtualizes (removes the need to directly manage) server hardware, containers virtualize the operating system of a server. Docker is installed on each server and provides simple commands you can use to build, start, or stop containers.&lt;br&gt;
AWS services such as &lt;strong&gt;AWS Fargate&lt;/strong&gt;, &lt;strong&gt;Amazon ECS&lt;/strong&gt;, &lt;strong&gt;Amazon EKS&lt;/strong&gt;, and &lt;strong&gt;AWS Batch&lt;/strong&gt; make it easy to run and manage Docker containers at scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker properties&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Each application that runs in the container will work in isolation from other applications in the rest of the containers, as it will be as if each application is running on an operating system alone, but the truth is that it is one operating system and all applications in the containers share it, and the Docker engine is the one that performs the management currency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;More than one container can run on a single operating system and is run by the Docker engine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Applications can be run on Docker through containers on a private laptop, on a server, or on the cloud.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why use Docker&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using Docker lets you ship code faster, standardize application operations, seamlessly move code, and save money by improving resource utilization. With Docker, you get a single object that can reliably run anywhere. Docker's simple and straightforward syntax gives you full control. Wide adoption means there's a robust ecosystem of tools and off-the-shelf applications that are ready to use with Docker.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Ship more software faster&lt;/strong&gt;&lt;br&gt;
Docker users on average ship software 7x more frequently than non-Docker users. Docker enables you to ship isolated services as often as needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Standardize Operations&lt;/strong&gt;&lt;br&gt;
Small containerized applications make it easy to deploy, identify issues, and roll back for remediation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Seamlessly move&lt;/strong&gt;&lt;br&gt;
Docker-based applications can be seamlessly moved from local development machines to production deployments on AWS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Save money&lt;/strong&gt;&lt;br&gt;
Docker containers make it easier to run more code on each server, improving your utilization and saving you money.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some important terms in Docker&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Image:&lt;/strong&gt;&lt;br&gt;
It is a template of code that cannot be modified. It is manufactured by other people or companies, such as Odoo, sonarqube, Ubuntu, Nginx, and others. It contains some instructions on how to create a Docker container through it. &lt;br&gt;
&lt;strong&gt;The Docker image&lt;/strong&gt; is all the things you need to run the application and it is light and small in size and easy to use because it contains only what the application needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker container:&lt;/strong&gt; &lt;br&gt;
It is a piece of software, such as icons, files, etc., that you need to run your application, and a container is an image that runs. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Registry:&lt;/strong&gt; &lt;br&gt;
It is a repository or registry that contains all Docker images The Docker Hub (&lt;a href="https://hub.docker.com/" rel="noopener noreferrer"&gt;https://hub.docker.com/&lt;/a&gt;) is a repository for all images created and supported by Docker and is available for anyone to use.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Client:&lt;/strong&gt;&lt;br&gt;
It is the primary means by which a user can interact with Docker to run commands, for example, pull, build, run, and others.&lt;br&gt;
Which is a graphical interface, CLI, or something else, Docker uses an API to execute instructions or commands.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Docker demand:&lt;/strong&gt;&lt;br&gt;
It is a listener that waits for the command to be executed&lt;br&gt;
If the image is on your local device, it creates a container from it, and more than one container can be run from the same image&lt;br&gt;
If the image is not present, he will go to the registry ( Docker Hub ) and pull it from there.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Namespace:&lt;/strong&gt;&lt;br&gt;
Docker uses a technology called namespaces to provide the isolated workspace called the container, when you run a container, Docker creates a set of Namespace for that container. These Namespace provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker tag:&lt;/strong&gt;&lt;br&gt;
It is the address or reference to the docker image&lt;br&gt;
More than one tag can refer to the same image. Docker images can contain multiple tags pointing to the layers of the same image, allowing you to easily&lt;br&gt;
manage versions and references. Each image has a tag, so when the image is pulled without any tag, it pulls the latest. When specifying the tag, it removes the delimiter from it, for example, redis:alpain.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Image layers&lt;/strong&gt;&lt;br&gt;
Any change that happens or is made to the image is called a layer, which means that every command you specify (from, RUN, COPY, etc.) is a layer, and the sum of all layers is called a Dockerfile.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Dockerfile:&lt;/strong&gt;&lt;br&gt;
Is a text document that contains all the commands a user could call on the command line to assemble an image.&lt;br&gt;
Dockerfile can build images automatically by reading the instructions from a Dockerfile.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Docker on an Amazon Web Services (AWS) instance&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;To install Docker on an Amazon Web Services (AWS) instance, you can follow these steps: Log in to the AWS Control Panel:&lt;br&gt;
-Start logging in to your AWS account through the Control Panel (AWS Management Console).&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Create an EC2 instance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the EC2 section of the Control Panel.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Click on "&lt;strong&gt;Launch Instances&lt;/strong&gt;" to start the EC2 instance creation.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Name and Tags, AMI selections:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;-Give the instance a name.&lt;br&gt;
-Choose Ubuntu (&lt;strong&gt;free tier eligible&lt;/strong&gt;) or another operating system that supports Docker as the instance platform.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Installation configuration:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose the instance type (&lt;strong&gt;t2.micro-free tier eligible&lt;/strong&gt;) or another type, and specify the required resources (such as processor type and memory size).&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Choose your SSH key (key pair) if this was done previously, or create a new key and save it somewhere safe.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Follow the required steps until you reach the "Configure Security Group" section. In this section, make sure to configure Allow SSH port (port 22) to access the instance.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Instance launch:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Browse and confirm the settings, then click "Launch instance". Accessing the instance via SSH:&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdq1yzh7xa3swhn3hlxdn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdq1yzh7xa3swhn3hlxdn.png" alt=" " width="800" height="209"&gt;&lt;/a&gt;&lt;br&gt;
Successfully launch the instance is done, click on the instance ID.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect to the instance:&lt;/strong&gt;&lt;br&gt;
After you launch the instance, you can use your SSH key to connect to it.&lt;br&gt;
First, choose the instance and the click on &lt;strong&gt;connect&lt;/strong&gt; `&lt;/p&gt;

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

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

&lt;p&gt;-In the terminal window, Use the following command:&lt;br&gt;
-&lt;code&gt;chmod 400 teste.pem&lt;/code&gt; &lt;br&gt;
Then:&lt;br&gt;
-&lt;code&gt;ssh -i "teste.pem" ubuntu@ec2-3-110-86-76.ap-south-1.compute.amazonaws.com&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Execute the command: &lt;br&gt;
&lt;code&gt;Sudo –i&lt;/code&gt; &lt;br&gt;
"sudo": is short for "Super User Do", which is a command that allows regular users to execute certain commands with root user privileges.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Docker installation:&lt;/strong&gt; &lt;br&gt;
After connecting to the instance via SSH and obtaining the root privilege, use the following command automation to install Docker:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - &amp;amp;&amp;amp; sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" &amp;amp;&amp;amp; sudo apt-get update &amp;amp;&amp;amp; apt-cache policy docker-ce&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Docker experience:&lt;/strong&gt; Run a simple test command &lt;code&gt;docker -v&lt;/code&gt; to check that Docker is working properly and to see the Docker version:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefeh7n91g4xca1bnhamq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefeh7n91g4xca1bnhamq.png" alt=" " width="350" height="44"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some basic commands for Docker&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker pull [image name]:tag&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;The docker pull command is used to download Docker images from a specified repository, where: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Image name: The name of the Docker image you want to pull. &lt;/li&gt;
&lt;li&gt;tag: Optional tag (version) of the image. If not specified, it defaults to (latest).
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example: &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3rssx56wrjp5q04amjq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3rssx56wrjp5q04amjq.png" alt=" " width="705" height="75"&gt;&lt;/a&gt;&lt;br&gt;
This command will fetch the latest version of the Ubuntu image from the Docker Hub repository and store it on your local machine.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker images&lt;/code&gt; &lt;/p&gt;

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

&lt;p&gt;This command displays a list of all the images on your device with details such as the image's name, tag, and size.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;docker rmi [image name:tag]&lt;/code&gt; &lt;br&gt;
To remove one image. For example: &lt;/p&gt;

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

&lt;p&gt;And again to display the images after removing by the command &lt;code&gt;docker images&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;docker run [image name]&lt;/code&gt;&lt;br&gt;
The docker run command is used to create and start a new Docker container based on a specified image. It allows you to run a command or process inside the container, and you can customize various aspects of the container's behavior using options.&lt;br&gt;
For example:&lt;/p&gt;

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

&lt;p&gt;To displays existing containers by the command:&lt;br&gt;
&lt;code&gt;docker ps –all&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;All containers can be shown even if there is more than one container for the same image by command: &lt;code&gt;docker container ls –a&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker ps –a&lt;/code&gt; &lt;br&gt;
To list all containers, including both running and stopped containers.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;docker rm [container id]&lt;/code&gt; &lt;br&gt;
To remove one or more container &lt;/p&gt;

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

&lt;p&gt;Again, run the &lt;code&gt;docker ps -a&lt;/code&gt; command to show that the container is not in the list and that it has been deleted:&lt;/p&gt;

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

&lt;p&gt;You can also specify a custom command to run in the container:&lt;/p&gt;

&lt;p&gt;In this case, the &lt;code&gt;echo "Hello, Docker!"&lt;/code&gt; the command will be executed inside a new container based on the image.&lt;br&gt;
The execution is &lt;strong&gt;Hello, Docker!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;docker run&lt;/code&gt; command can be customized using various options to control aspects such as networking, volumes, environment variables, ports, and more.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker container –d [image]&lt;/code&gt; &lt;br&gt;
The &lt;code&gt;-d&lt;/code&gt; helps run the container in the background That is, when the screen is turned off by running the image and we open a new window, it remains present.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker inspect [image]&lt;/code&gt; &lt;br&gt;
The docker inspect command is used to obtain detailed information about a Docker container or image, including metadata, configuration, networking details, and more. It provides a comprehensive JSON-formatted output that can be useful for debugging, troubleshooting, or extracting specific information from Docker objects.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;docker stats [container id ]&lt;/code&gt; &lt;br&gt;
The &lt;code&gt;docker stats&lt;/code&gt; command is used to display a live stream of resource usage statistics for running containers. It provides real-time information about the CPU, memory, network I/O, and block I/O usage of each container. This command can be useful for monitoring and understanding the resource consumption of your Docker containers. &lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;docker --help&lt;/code&gt; &lt;br&gt;
Running &lt;code&gt;docker --help&lt;/code&gt; in the command line will provide you with a summary of the available Docker commands and their descriptions. However, the output might be quite extensive. Here's a simplified version of the output you might see:&lt;/p&gt;

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

&lt;p&gt;and other commands ….&lt;/p&gt;

&lt;p&gt;References:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/docker/" rel="noopener noreferrer"&gt;https://aws.amazon.com/docker/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>aws</category>
      <category>cloud</category>
      <category>linux</category>
    </item>
    <item>
      <title>Our WordPress site installation by AWS</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Thu, 03 Aug 2023 01:33:49 +0000</pubDate>
      <link>https://forem.com/zahraajawad/our-wordpress-site-installation-by-aws-34jn</link>
      <guid>https://forem.com/zahraajawad/our-wordpress-site-installation-by-aws-34jn</guid>
      <description>&lt;p&gt;WordPress is a popular content management system (CMS) that allows users to create and manage websites without extensive coding knowledge. Originally developed as a blogging platform, WordPress has evolved into a versatile tool for creating websites of all kinds, from personal blogs to e-commerce sites to corporate portals. 43% of the web is built on WordPress. More bloggers, small businesses, including notable brands and publications such as The New York Times, Forbes, and Sony Music.&lt;/p&gt;

&lt;p&gt;On a slightly more technical level, WordPress is an open-source content management system licensed under GPLv2, which means that anyone can use or modify the WordPress software for free. A content management system is basically a tool that makes it easy to manage important aspects of your website – like content – without needing to know anything about programming.&lt;br&gt;
The end result is that WordPress makes building a website accessible to anyone – even people who aren’t developers.&lt;/p&gt;

&lt;p&gt;WordPress is licensed under the General Public License (GPLv2 or later) which provides four core freedoms:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The freedom to run the program for any purpose.&lt;/li&gt;
&lt;li&gt;The freedom to study how the program works and change it to make it do what you wish.&lt;/li&gt;
&lt;li&gt;The freedom to redistribute.&lt;/li&gt;
&lt;li&gt;The freedom to distribute copies of your modified versions to others. And the some Features of WordPress:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;• Easy-to-use interface with a visual editor and drag-and-drop functionality.&lt;/p&gt;

&lt;p&gt;• Thousands of customizable themes and plugins to enhance functionality and design.&lt;/p&gt;

&lt;p&gt;• Built-in SEO tools to optimize content for search engines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WordPress.org and WordPress.com&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The difference between WordPress.org and WordPress.com in a lot more detail, but here’s the short version:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• WordPress.org&lt;/strong&gt;, often called self-hosted WordPress, is free, open-source WordPress software that you can install on your own web host to create a website that’s 100% your own.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• WordPress.com&lt;/strong&gt; is a for-profit, paid service that is powered by the WordPress.org software. It’s simple to use, but you lose much of the flexibility of the self-hosted WordPress. Most of the time, when people say “WordPress”, they mean the self-hosted WordPress available at WordPress.org. If you want to truly own your website, self-hosted WordPress.org is almost always the best option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secure and Reliable of WordPress&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;WordPress is highly secure and reliable, thanks to its dedicated team continuously working on improving its security features and addressing vulnerabilities. With regular updates, robust user authentication, and a vast plugin ecosystem for enhanced security, WordPress provides a trustworthy platform for businesses and bloggers to protect their valuable data and ensure a stable online presence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kinds of Websites that Can Make Using WordPress&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Any type of website imaginable can be made with WordPress. Users from all over the world use WordPress to make money online. It's simple enough to quickly create small websites and flexible enough to run e-commerce operations.&lt;/p&gt;

&lt;p&gt;Here are some of the types of websites you can build with WordPress:&lt;/p&gt;

&lt;p&gt;• Start a blog&lt;br&gt;
• Make a small business website&lt;br&gt;
• Create an online store&lt;br&gt;
• Build a membership community&lt;br&gt;
• Sell online courses&lt;br&gt;
• and many more&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creation of WordPress by AWS: A Step-By-Step:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Some simple steps that we will implement to install WordPress: begin, first create an AWS account if you don't already have one. This will give you access to all the necessary tools and services for deploying WordPress on AWS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• launch an instance in your AWS account&lt;/strong&gt;, This will provide the virtual server that will host your WordPress site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Connect to the instance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Execute some commands to install WordPress&lt;/strong&gt;, With WordPress installed, it's time to configure your site. This includes setting up your database, selecting a theme, and installing any necessary plugins.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Log in to WordPress&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: launch an instance in your AWS account&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When logging into the AWS account, we select the EC2 service through Services or through the search box&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Click on Launch instance&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Under &lt;strong&gt;Name and tags&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enter a name to identify your instance, For this tutorial, name the instance (&lt;strong&gt;WordPress&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Under &lt;strong&gt;Application and OS Images&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;From &lt;strong&gt;Quick Start&lt;/strong&gt;, choose an AMI that meets your web server needs&lt;/li&gt;
&lt;li&gt;Here we choose Ubuntu (which is free tier eligible)&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Under &lt;strong&gt;Instance type&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose the type of instance, here we choose &lt;strong&gt;t2.micro&lt;/strong&gt; (free tier)&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Under &lt;strong&gt;Key pair&lt;/strong&gt; (login):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose the &lt;strong&gt;key pair&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Give a name to the key pair, then click &lt;strong&gt;Create key pair&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Under &lt;strong&gt;Network settings&lt;/strong&gt;: under &lt;strong&gt;Firewall (security groups)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose to Create security groups&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;To Allow SSH traffic&lt;/strong&gt; by clicking on the check box &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;To Allow HTTP traffic from the internet&lt;/strong&gt; by clicking on the check box&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Leave all other configurations as they are (default settings) &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;Summary&lt;/strong&gt; panel, review your instance configuration and then choose &lt;strong&gt;Launch instance&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Choose &lt;strong&gt;View all instances&lt;/strong&gt; to close the confirmation page and return to the console. Your instance will first be in a Pending state, and will then go into the Running state.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 2: Connect to the instance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To connect to your instance, select the instance and choose &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;There are many ways to connect to ec2, here we will choose the &lt;strong&gt;SSH client&lt;/strong&gt; to connect.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After selecting the "&lt;strong&gt;SSH Client&lt;/strong&gt;" section, copy and execute the following commands in the terminal as per the following steps:&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Open Terminal (here we use Git Bash)&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Change the directory with the cd command (change directory), where you have downloaded your pem file(key pair).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In this article, the pem file is stored in the downloads folder.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Execute the &lt;strong&gt;cd&lt;/strong&gt; command to change the path to the location of the encryption key&lt;br&gt;
&lt;strong&gt;cd Download/&lt;/strong&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Execute the following commands sequentially&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; Chmod 400 [key pair name].pem&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; ssh -i /path/key-pair-name.pem instance-user-name@instance-public-dns-name&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;After the command is executed you will be prompted to type “Yes” to continue with the connection&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;And that’s it! Now we’re logged in to our AWS instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before installing WordPress on an EC2 instance: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We get root permission by executing the &lt;strong&gt;sudo -i&lt;/strong&gt; command&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8svusypib0kzb79dwhef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8svusypib0kzb79dwhef.png" alt=" " width="459" height="117"&gt;&lt;/a&gt;&lt;br&gt;
Executing the command "&lt;strong&gt;sudo -i&lt;/strong&gt;" means booting as root on Linux. The main feature of this command is that it gives you full admin (root user) privileges, allowing you to perform commands and operations that require root user privileges.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update the list of online software repositories: to obtain the latest list of packages available for installation and update. This procedure helps to obtain the latest versions and updates for the programs installed on your system. This is done by executing the &lt;strong&gt;sudo apt-get update&lt;/strong&gt; command&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Step 3: Execute some commands to install WordPress&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Execute the command: &lt;strong&gt;sudo apt install apache2 -y&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Installs Apache Web Server (Apache HTTP Server) on Linux using a package manager Software APT (Advanced Packaging Tool) This command assumes that it is running on an APT-based system Ubuntu, Debian, or Linux-derived systems.&lt;br&gt;
Once this command is executed, the system will download and install the Apache web server on your system, and you are all set&lt;br&gt;
To use it to host web pages and web applications on your own server.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1glel9dweuslqnpmogll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1glel9dweuslqnpmogll.png" alt=" " width="800" height="505"&gt;&lt;/a&gt;&lt;br&gt;
To make sure that the web server has been installed successfully, we go to the EC2 instance and copy the public IPv4 address to any browser. We note that the installation has been completed successfully.&lt;/p&gt;

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

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

&lt;ol&gt;
&lt;li&gt;Installing php runtime on our ec2 (because WordPress is built on PHP) and a MySQL connector for PHP)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;sudo apt install php libapache2-mod-php php-mysql -y&lt;/strong&gt;&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Install MySQL server for the database, To create and manage databases on our server. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;sudo apt install mysql-server -y&lt;/strong&gt;&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Change our MySQL authentication plugin to a MySQL native password so that we can log in to the MySQL server with a normal password which is what is required in order to install WordPress. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;sudo mysql -i&lt;/strong&gt;&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;To change how the root user account (root) in the MySQL database authenticates to the default user root ((localhost). It is assumed that you execute this command when you set up a new database for a WordPress website, for example. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;ALTER USER 'root'&lt;a class="mentioned-user" href="https://dev.to/localhost"&gt;@localhost&lt;/a&gt; IDENTIFIED WITH mysql_native_password BY ‘[any password]';&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Our password here is “&lt;strong&gt;wordpresspassword&lt;/strong&gt;”&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Create a new database to use with WordPress &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;create database [Name your database];&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The name of the database here is “ &lt;strong&gt;wordpressdatabase&lt;/strong&gt; “&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;To assign all the privileges on the database to the user:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;grant all privileges on [name of database].* to (root)‘root’&lt;a class="mentioned-user" href="https://dev.to/localhost"&gt;@localhost&lt;/a&gt;;&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Then exit from the MySQL prompt by the &lt;strong&gt;exit&lt;/strong&gt; command or &lt;strong&gt;ctrl d&lt;/strong&gt; from the keyboard.&lt;/p&gt;

&lt;p&gt;Now go to install WordPress:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;From the browser go to the &lt;strong&gt;&lt;a href="https://wordpress.org/download./" rel="noopener noreferrer"&gt;https://wordpress.org/download./&lt;/a&gt;&lt;/strong&gt;
and click on &lt;strong&gt;download and install&lt;/strong&gt; and copy the download link.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Execute the wget command with the download link that we copied from the web page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;wget &lt;a href="https://wordpress.org/latest.tar.gz" rel="noopener noreferrer"&gt;https://wordpress.org/latest.tar.gz&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Then unzip the file that we are downloaded&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;tar xzf latest.tar.gz&lt;/strong&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Now use the &lt;strong&gt;ls&lt;/strong&gt; command to show the downloaded file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rop9ufhrabqf1aspiar.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rop9ufhrabqf1aspiar.png" alt=" " width="406" height="113"&gt;&lt;/a&gt;&lt;br&gt;
-To move the WordPress folder to the document root of Apache, by the command:&lt;br&gt;
&lt;strong&gt;sudo mv wordpress/ /var/www/html/&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fufmwjkbivw9k57vdu3r2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fufmwjkbivw9k57vdu3r2.png" alt=" " width="700" height="113"&gt;&lt;/a&gt;&lt;br&gt;
Enter to the document root of apache &lt;strong&gt;/var/www/html/&lt;/strong&gt; by change directory command &lt;strong&gt;cd&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gkxchfhlhnsq0tez1hz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gkxchfhlhnsq0tez1hz.png" alt=" " width="525" height="90"&gt;&lt;/a&gt;&lt;br&gt;
-use the &lt;strong&gt;ls&lt;/strong&gt; command to show the WordPress file is moving to the root of Apache &lt;strong&gt;/var/www/html/&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Go back to the browser and type in our &lt;strong&gt;public ipv4 address / wordpress&lt;/strong&gt;. It will open the WordPress installation screen.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enter the database name, username, and password, then click on &lt;strong&gt;Submit&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;-It shows us there is an error that it is unable to write to the &lt;strong&gt;wp-confige.php&lt;/strong&gt; file&lt;/p&gt;

&lt;p&gt;-To fix this error, copy all the code and go back to the terminal&lt;/p&gt;

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

&lt;p&gt;-Go to the WordPress directory and create the new file name wp-confige.php by the nano command :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nano wp-confige.php&lt;/strong&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;And past the code by &lt;strong&gt;ctrl u&lt;/strong&gt; from the keyboard&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;-To exit from the file: from the keyboard by &lt;strong&gt;ctrl x&lt;/strong&gt; then &lt;strong&gt;y&lt;/strong&gt; (to save the file) then click &lt;strong&gt;enter&lt;/strong&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Run the installation&lt;/strong&gt; and show then the error is fixed by the following screen appears.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;By This screen, give a name to our site, username, and email, here we name the site "&lt;strong&gt;WPSite&lt;/strong&gt;" and the user name “&lt;strong&gt;MyWordPress&lt;/strong&gt;”.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;The WordPress installation is in a success and click on Log in to go to the &lt;strong&gt;log in&lt;/strong&gt; screen.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Enter the username or email and password to log in to the site&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;This is our WordPress Dashboard and we can begin our work&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Important note:&lt;/strong&gt;  assign the instance an elastic IP address to be static so anyone can know where our website is hosted, so need the IP address to be static. Note that attaching an elastic IP address is not free, but imposes a certain fee on it. &lt;/p&gt;

&lt;p&gt;So, we attach a elastic IP address to the instance before we take the steps to connect to the instance, through the following steps:&lt;/p&gt;

&lt;p&gt;On the left side of the instance dashboard, we choose &lt;strong&gt;elastic IPs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F06qzmaw3ammaw9wdzrb6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F06qzmaw3ammaw9wdzrb6.png" alt=" " width="277" height="805"&gt;&lt;/a&gt;&lt;br&gt;
-Then click on &lt;strong&gt;Allocate Elastic IP address&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;• Created successfully&lt;br&gt;
• Choose the IP and click on &lt;strong&gt;Action&lt;/strong&gt; and choose &lt;strong&gt;Associate Elastic IP address&lt;/strong&gt;&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Define the instance type &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2 . Choose the instance to which the elastic IP will be attached&lt;/p&gt;

&lt;p&gt;3 . Click on &lt;strong&gt;Allocate&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;The elastic IP address is associated with the instance and will remain unchanged even when the instance is stopped and restarted.&lt;/p&gt;

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

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

&lt;p&gt;&lt;a href="https://kinsta.com/knowledgebase/what-is-wordpress/" rel="noopener noreferrer"&gt;https://kinsta.com/knowledgebase/what-is-wordpress/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.bluehost.com/blog/what-is-wordpress/" rel="noopener noreferrer"&gt;https://www.bluehost.com/blog/what-is-wordpress/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://wordpress.org/about/" rel="noopener noreferrer"&gt;https://wordpress.org/about/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.wpbeginner.com/beginners-guide/what-is-wordpress/" rel="noopener noreferrer"&gt;https://www.wpbeginner.com/beginners-guide/what-is-wordpress/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>aws</category>
      <category>cloud</category>
      <category>html</category>
    </item>
    <item>
      <title>ENCRYPTION BY AWS KMS SERVICE</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Thu, 20 Jul 2023 18:28:35 +0000</pubDate>
      <link>https://forem.com/zahraajawad/encryption-by-aws-kms-service-53f3</link>
      <guid>https://forem.com/zahraajawad/encryption-by-aws-kms-service-53f3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Outline&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is AWS KMS?&lt;/li&gt;
&lt;li&gt;Comparison of AWS KMS with Other Encryption Services&lt;/li&gt;
&lt;li&gt;Comparing Encryption Methods in AWS KMS&lt;/li&gt;
&lt;li&gt;Best Practices for Securing Encrypted Data in AWS KMS&lt;/li&gt;
&lt;li&gt;Advanced Encryption Techniques&lt;/li&gt;
&lt;li&gt;How to generate AWS KMS encryption keys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What is AWS KMS?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AWS KMS Key Encryption (Key Management Service) is a service provided by Amazon Web Services (AWS) that allows the generation and management of keys to encrypt data in an AWS environment.&lt;br&gt;
AWS KMS provides an API that can be used to create, import, and manage keys, as well as encrypt and decrypt data with those keys.&lt;br&gt;
AWS KMS uses trusted encryption methods such as AES-256 to secure keys and data. This service allows the protection of sensitive data from unauthorized access and ensures compliance with security standards and applicable legislation.&lt;br&gt;
With AWS KMS, private keys can be generated and stored in the secure service, and data is encrypted with these keys. KMS can also be used to control access to keys, manage key lifecycles, delegate access to keys, and monitor key-related activities.&lt;/p&gt;

&lt;p&gt;In short, AWS KMS provides the ability to create and manage your own keys and encrypt data with those keys in a secure and trusted way in an AWS environment.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Comparison of AWS KMS with Other Encryption Services&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS KMS&lt;/strong&gt;&lt;br&gt;
 AWS Key Management Service (KMS) is a fully managed service that makes it easy to create and control the encryption keys used to encrypt your data. It integrates with other AWS services to provide seamless encryption for your data, and allows you to manage your encryption keys through the AWS Management Console, AWS CLI, or AWS SDKs. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Other Encryption Services&lt;/strong&gt; &lt;br&gt;
Other encryption services in the market include Microsoft Azure Key Vault, Google Cloud KMS, and HashiCorp Vault. These services offer similar functionality to AWS KMS, but may differ in terms of pricing, ease of use, and integration with other services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comparing Encryption Methods in AWS KMS&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Best Practices for Securing Encrypted Data in AWS KMS:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Strong Access Controls&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensure that only authorized users and services can access your 
encryption keys.&lt;/li&gt;
&lt;li&gt;Use AWS Identity and Access Management (IAM) policies to 
restrict access to the KMS API and specific KMS keys.&lt;/li&gt;
&lt;li&gt; Use AWS CloudTrail to audit key usage and changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Encrypt Your Data Before Storing It&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Encrypt data before storing it in AWS KMS. This ensures that the 
data is protected even if the underlying storage is compromised.&lt;/li&gt;
&lt;li&gt;Use client-side encryption libraries to encrypt data before 
sending it to AWS KMS.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Management&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Follow the principle of least privilege when granting access to 
KMS keys.&lt;/li&gt;
&lt;li&gt;Use AWS CloudTrail to monitor and log all key usage.&lt;/li&gt;
&lt;li&gt;Rotate keys regularly to minimize the impact of a compromised 
key.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Encryption&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use envelope encryption to encrypt large amounts of data.&lt;/li&gt;
&lt;li&gt;Encrypt data at rest using KMS-managed keys.&lt;/li&gt;
&lt;li&gt;Use AWS KMS to encrypt data in transit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AWS KMS: Advanced Encryption Techniques&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Custom Key Management&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;A custom key store is a logical key store within AWS KMS that is backed by a key manager outside of AWS KMS that you own and manage. Custom key stores combine the convenient and comprehensive key management interface of AWS KMS with the ability to own and control the key material and cryptographic operations. AWS KMS allows for custom key management, giving users greater control over their encryption keys. Users can create and manage their own keys, or use AWS-managed keys for added convenience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Envelope Encryption&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AWS KMS supports envelope encryption, which adds an extra layer of security to encryption keys.&lt;br&gt;
With envelope encryption, data is encrypted with a data key, which is then encrypted with a master key.&lt;br&gt;
This provides an additional layer of protection, as the master key is never exposed to the data being encrypted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to generate AWS KMS encryption keys AWS&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log in to the AWS Management Console.&lt;/li&gt;
&lt;li&gt;From Services or the box search to choose Key Management Service.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;From navigate to the AWS KMS dashboard: &lt;br&gt;
Choose &lt;strong&gt;customer managed keys&lt;/strong&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;We note the previously created keys (key1)&lt;/li&gt;
&lt;li&gt;To create a new encryption key, select &lt;strong&gt;Create key&lt;/strong&gt; to create a new encryption key.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1kzzvddcaof4jusf8t6u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1kzzvddcaof4jusf8t6u.png" alt=" " width="800" height="257"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; We note that although the key was previously created, the deletion process continues Because the encryption key cannot be deleted directly, it takes at least seven days for the deletion process to be completed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key type:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We choose the type of encryption key, &lt;strong&gt;Symmetric&lt;/strong&gt; or &lt;strong&gt;Asymmetric&lt;/strong&gt; (here we will choose the symmetric encryption key).&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Use the key only to encrypt and decrypt data.&lt;/li&gt;
&lt;li&gt;Use the key only to generate and verify hash-based message authentication codes (HMAC).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advanced options:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key material origin -&lt;/strong&gt; This is where you are using AWS KMS&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- KMS:&lt;/strong&gt; This means you creating the key management service on AWS&lt;br&gt;&lt;br&gt;
&lt;strong&gt;- External:&lt;/strong&gt; This is if you using external which means if you have any symmetric 256 key management system you can bring it into your KMS.&lt;br&gt;
&lt;strong&gt;- AWS CloudHSM key:&lt;/strong&gt; if you are using the customer key store in CloudHsm &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Choose the key generation Region:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a KMS key in a single AWS Region (by default)&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Or generate a KMS key that you can replicate to multiple AWS Regions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then click on &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Add labels:&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;1.&lt;/strong&gt; Provide a name for the key. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Description -&lt;/strong&gt; (optional)&lt;br&gt;
&lt;strong&gt;2.&lt;/strong&gt; Put a Description for the key. &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Tags:&lt;/strong&gt;(optional) &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can use tags(&lt;strong&gt;Add Tag&lt;/strong&gt;)to categorize and identify your KMS keys and help you track your AWS costs. When you add tags to AWS resources, AWS generates a cost allocation report for each tag.&lt;/li&gt;
&lt;li&gt;Then click on &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Define key administrative permissions:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We choose the IAM users and roles that can manage this key through the KMS API. You may need to add additional permissions for users or roles to manage this key from this console.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Key deletion:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To allow key administrators to delete this key, Choose the check box.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;We define which IAM users and roles can use the KMS key for encryption operations.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Additional AWS accounts can be added that can use this key. (Administrators of the accounts you specify are responsible for managing the permissions that allow IAM users and their roles to use this key).&lt;/li&gt;
&lt;li&gt;Then click on &lt;strong&gt;Next&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Reviewing all created encryption key configurations.&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;ul&gt;
&lt;li&gt;The encryption key AWS KMS has been generated successfully&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Some actions can be taken on the key such as enabling the key to be used for encryption, disabling the key, or deleting the key, we do this by checking the checkbox for the key and choosing from the &lt;strong&gt;Key action&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Encrypt Data with the CMK&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;After generating AWS KMS encryption keys, it can be used to encrypt sensitive application data stored in the volume storage in EC2 or databases or object stores such as S3 using AWS KMS.&lt;/p&gt;

&lt;p&gt;For example, in the EC2 service, when an instance is created, the volume storage can be encrypted by selecting encryption in the encryption box.&lt;/p&gt;

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

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

&lt;p&gt;Also, data can be encrypted when creating new volume storage through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the checkbox for Encryption this value&lt;/li&gt;
&lt;li&gt;Then choose the encryption key.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Sensitive application data stored in storage in object stores such as S3 can be encrypted with AWS KMS.&lt;br&gt;
When creating the bucket:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Choose how to encrypt objects via AWS KMS&lt;/li&gt;
&lt;li&gt;Choose the key generated by AWS KMS.&lt;/li&gt;
&lt;li&gt;Then choose the encryption key that was generated.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;&lt;strong&gt;Deletion of the Encryption key AWS KMS&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;You should delete a KMS key only when you are sure that you don't need to use it anymore. If you are not sure, consider disabling the KMS key instead of deleting it. You can re-enable a disabled KMS key and cancel the scheduled deletion of a KMS key, but you cannot recover a deleted KMS key. You can only schedule the deletion of a customer managed key. You cannot delete AWS managed keys or AWS owned keys.&lt;/p&gt;

&lt;p&gt;However, you might choose to delete a KMS key for one or more of the following reasons:&lt;br&gt;
• To complete the key lifecycle for KMS keys that you no longer &lt;br&gt;
  need&lt;br&gt;
• To avoid the management overhead and costs associated with &lt;br&gt;
  maintaining unused KMS keys&lt;br&gt;
• To reduce the number of KMS keys that count against your KMS key &lt;br&gt;
  resource quota.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To delete the encryption key:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• We select the key to be deleted by the checkbox.&lt;br&gt;
• From the key action choose &lt;strong&gt;Schedule key deletion&lt;/strong&gt;&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Enter a waiting period between 7 and 30 days (Since deleting a KMS key is disruptive and potentially dangerous, AWS KMS requires you to set a waiting period of 7 to 30 days. The default waiting period is 30 days).&lt;/li&gt;
&lt;li&gt;Then choose the checkbox to confirm the schedule key deletion&lt;/li&gt;
&lt;li&gt;Then click on &lt;strong&gt;Schedule deletion&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;ul&gt;
&lt;li&gt;Successfully scheduled deletion of key and you can note that from the status of the key &lt;strong&gt;(Pending deletion)&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://aws.amazon.com/kms/" rel="noopener noreferrer"&gt;https://aws.amazon.com/kms/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://aws.amazon.com/ar/kms/" rel="noopener noreferrer"&gt;https://aws.amazon.com/ar/kms/&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/kms/latest/developerguide/best-practices.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/kms/latest/developerguide/best-practices.html&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>community</category>
      <category>security</category>
      <category>cloud</category>
    </item>
    <item>
      <title>WHAT ARE CRYPTOGRAPHY AND CRYPTOGRAPHY IN AWS</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Fri, 09 Jun 2023 19:13:54 +0000</pubDate>
      <link>https://forem.com/zahraajawad/what-are-cryptography-and-cryptography-in-aws-1074</link>
      <guid>https://forem.com/zahraajawad/what-are-cryptography-and-cryptography-in-aws-1074</guid>
      <description>&lt;p&gt;&lt;strong&gt;Outline&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Encryption&lt;br&gt;
Stages of data encryption&lt;br&gt;
Key generation&lt;br&gt;
Encryption in AWS&lt;br&gt;
AWS Key Management Service (AWS KMS)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Encryption&lt;/strong&gt;&lt;br&gt;
Encryption refers to the conversion of files or data from one state to another while it is being transferred from one place to another or from one point to another to prevent it from being viewed except by the authorized person, where files are converted from readable file to unreadable unless decryption keys are used by the authorized person or entity. In general, encryption ensures the confidentiality and security of information and communications and contributes to the protection of privacy and the preservation of data integrity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There are states and types of encryption:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Encryption in transit:&lt;/strong&gt;&lt;br&gt;
When transferring with encryption keys, keys are used to encrypt and decrypt the data during the transmission. Encrypting data with a key means converting data into a form that is unreadable unless the correct key is present. When the data is received at the intended end, the correct key is used to decrypt it and restore it to its original state This is done while transferring data and files from one point to another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Encryption at rest:&lt;/strong&gt;&lt;br&gt;
Encryption during storage after delivery.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stages of data encryption&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Data and files before encryption are called plain text, i.e. plain text, images, video, or any form of data. After the encryption process, they are called cipher text, i.e. encrypted data. When using the decryption key, the data returns to its original state as plain text.&lt;/p&gt;

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

&lt;p&gt;There are two types of encryption:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Symmetric encryption: With this encryption, the same key is used for encryption and decryption.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Asymmetric encryption: Two keys are used, one for encryption and one for decryption&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Key generation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Key generation is the process of creating cryptographic keys used in various cryptographic algorithms and protocols. Cryptographic keys are essentially a string of random bits that serve as inputs to encryption and decryption algorithms.&lt;br&gt;
A device or program used to generate keys is called a key generator or keygen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Encryption in AWS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the services provided by AWS, AWS supports both symmetric keys and asymmetric keys for encryption, and there are some services that use symmetric keys in encryption operations, and some other services that use asymmetric keys.&lt;/p&gt;

&lt;p&gt;AWS also has other services that provide multiple encryption options using both symmetric and asymmetric keys, such as AWS CloudHSM, Amazon Kinesis, Amazon EKS, and others. See the official AWS documentation and developer guides for more details on how symmetric and asymmetric keys are used in specific services.&lt;/p&gt;

&lt;p&gt;AWS encryption keys are used in AWS services:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Symmetric Keys:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;• Amazon S3:&lt;/strong&gt; Managed S3 Server-Side Encryption with symmetric keys can be used to encrypt data stored in an S3 bucket.&lt;br&gt;
&lt;strong&gt;• Amazon EBS:&lt;/strong&gt; EBS supports symmetric keys for storage disk encryption.&lt;br&gt;
&lt;strong&gt;• Amazon RDS:&lt;/strong&gt; Symmetric keys can be used to encrypt databases in RDS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Asymmetric Keys:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;• AWS Key Management Service (KMS):&lt;/strong&gt; KMS allows you to create and manage asymmetric keys, which can be used in different AWS services such as S3, EBS, RDS, and others.&lt;br&gt;
&lt;strong&gt;• AWS Certificate Manager (ACM):&lt;/strong&gt; ACM uses asymmetric keys to issue and manage digital certificates that are used to secure HTTPS connections.&lt;/p&gt;

&lt;p&gt;AWS also has other services that provide multiple encryption options using both symmetric and asymmetric keys, such as AWS CloudHSM, Amazon Kinesis, Amazon EKS, and others. See the official AWS documentation and developer guides for more details on how symmetric and asymmetric keys are used in specific services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS Key Management Service (AWS KMS)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In AWS there is the KMS (Key Management Service) and its function is to generate encryption keys and it is compatible with most other AWS services that need encryption. Which is a managed service that makes it easy to create and control the cryptographic keys that are used to protect your data. AWS KMS uses hardware security modules (HSM) to protect and validate your AWS KMS keys under the FIPS 140-2 Cryptographic Module Validation Program.&lt;/p&gt;

&lt;p&gt;An AWS KMS key is a logical representation of an encryption key. It is an essential resource in AWS KMS. To use or manage KMS keys, AWS KMS is required. The following three types of KMS keys can be generated in AWS KMS:&lt;br&gt;
&lt;strong&gt;• Client-managed key:&lt;/strong&gt; Established by the organization.&lt;br&gt;
&lt;strong&gt;• AWS managed key:&lt;/strong&gt; Generated by AWS services that use KMS keys to encrypt enterprise service resources.&lt;br&gt;
&lt;strong&gt;• AWS-owned key:&lt;/strong&gt; KMS keys created by AWS services in a service account.&lt;/p&gt;

&lt;p&gt;Other uses of AWS KMS include:&lt;br&gt;
• Protect your data at rest&lt;br&gt;
• Encrypt and decrypt data&lt;br&gt;
• Sign and verify digital signatures&lt;br&gt;
• Validate JSON web tokens using HMAC&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/kms/latest/developerguide/overview.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/kms/latest/developerguide/overview.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.techtarget.com/searchaws/definition/AWS-Key-Management-Service-AWS-KMS" rel="noopener noreferrer"&gt;https://www.techtarget.com/searchaws/definition/AWS-Key-Management-Service-AWS-KMS&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>security</category>
      <category>community</category>
    </item>
    <item>
      <title>Linux and Cybersecurity</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Sun, 21 May 2023 09:57:48 +0000</pubDate>
      <link>https://forem.com/zahraajawad/linux-and-cybersecurity-3jl2</link>
      <guid>https://forem.com/zahraajawad/linux-and-cybersecurity-3jl2</guid>
      <description>&lt;p&gt;&lt;strong&gt;Outline&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Meaning of Cybersecurity&lt;br&gt;
What is Linux?&lt;br&gt;
Linux and Cybersecurity&lt;br&gt;
Basic Linux commands&lt;br&gt;
Challenges and risks in Linux cybersecurity&lt;br&gt;
The mitigate of challenges and risks in Linux cybersecurity&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning of Cybersecurity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you are looking into becoming a professional in cybersecurity, it might benefit you to understand what is expected of you fully. Cybersecurity is the protection of devices and their associated data from coming into the possession of unauthorized individuals. Almost everything we do is online now due to convenience and efficiency. We shop online, we communicate online, and we store personal information and images online. This means that our credit cards, location, and personal information can all be accessed by strangers if they are not adequately protected.&lt;br&gt;
To defend against these attempts to acquire our personal information, virtually every personal device on the planet has a security program installed. Favored anti-virus software like Kaspersky or Norton is used to protect against hostile programs or hacking attempts from trojan horse programs that piggyback on otherwise legitimate downloads.&lt;/p&gt;

&lt;p&gt;This software has become such a critical component of our computer use that those who would exploit weaknesses in the system for their own gain have to constantly update and enhance their methods to get ahead of what protects us.&lt;br&gt;
Cybersecurity professionals are the ones who not only create the software we use to protect our information but they also maintain it. When hackers develop new tactics for circumventing antiviral software or cybersecurity programs, professionals analyze the tactics and update the programs to defend against the new tactic. They even find themselves engaging in counter-hacking attempts when the stolen information is sensitive enough to warrant further investigation. Every major law enforcement agency in the world now has a cybernetic crimes division that employs cybersecurity professionals to conduct these investigations and follow the digital trail back to these hostile hackers.&lt;/p&gt;

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

&lt;p&gt;An operating system is a software that controls the basic functions of a computer, such as managing memory, processing, and storage. Linux is one of the most popular open-source operating systems, which is used in many devices, and is characterized by its high security and ability to be customized and modified. &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Linux and Cybersecurity&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Linux is used by many cybersecurity experts and advanced computer users. Some of the reasons for the widespread use of Linux among cyber security experts and advanced computer users are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Open-source:&lt;/strong&gt; Linux is open-source, which means that its source code is freely available for anyone to view, modify, or distribute. This makes it easier for users to customize the operating system to their specific needs and allows developers to work together to improve its security and performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Security:&lt;/strong&gt; Linux is considered to be more secure than other operating systems, such as Windows, because it is less susceptible to viruses and other forms of malware. This makes it an attractive option for cybersecurity experts who need to protect sensitive information and networks from cyber threats. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Cost-effective:&lt;/strong&gt; Linux is free to download and use, which makes it a cost-effective option for individuals and organizations who want to save money on operating system costs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Flexibility:&lt;/strong&gt; Linux is highly customizable and can be tailored to meet the specific needs of different users, from home users to large corporations. This makes it a versatile option for advanced computer users and cybersecurity experts who need an operating system that can be adapted to their unique requirements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Community:&lt;/strong&gt; Linux has a large and active community of developers and users who work together to improve the operating system and provide support to each other. This makes it easier for advanced computer users and cybersecurity experts to find help and resources when they need it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Linux commands&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;A Linux command is a program or utility that runs on the CLI – a console that interacts with the system via texts and processes. It’s similar to the Command Prompt application in Windows. Linux commands are executed on Terminal by pressing Enter at the end of the line. You can run commands to perform various tasks, from package installation to user management and file manipulation. &lt;/p&gt;

&lt;p&gt;Here, we will learn about some basic Linux commands that help improve your cybersecurity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System Update&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;A system update is one of the essential commands that help improve cyber security in Linux. When the system is updated, security vulnerabilities are fixed, performance is improved, and features are developed, making the system more secure and stable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manage files and permissions&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;File and permission management commands help improve cybersecurity in Linux. The user can specify the appropriate permissions for files and folders and determine who can access them, which prevents intruders and hackers from accessing sensitive files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File encryption&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;File encryption commands help improve cybersecurity in Linux. Encryption techniques are used to protect and secure sensitive files from hacking, and they can only be opened with a password or a private key. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network control&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Network commands help improve cyber security in Linux. These commands are used to control network connectivity, determine which devices are allowed access, and prevent unauthorized access and cyberattacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Email fraud&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Phishing commands help improve cyber security in Linux. These commands are used to detect and prevent electronic fraud and cyberattacks before they occur and to identify and deal with the source of the attack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Linux features in cybersecurity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Linux has many features that make it more secure, such as a secure file system, privilege control, and strong data encryption.&lt;br&gt;
Linux also provides powerful tools to detect and deal with attacks and intrusions, such as security tools, rapid analysis, and advanced monitoring tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Linux security and networks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Linux is one of the best options for protecting networks and servers, as it is characterized by stability, high security, and full control over powers.&lt;br&gt;
Linux also provides powerful features to protect networks, such as firewalls, access control, and detection of various intrusions and attacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Machine Learning and Cybersecurity in Linux&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Linux has the ability to integrate machine learning into cybersecurity, where artificial intelligence and machine learning can be used to detect and deal with attacks and breaches.&lt;br&gt;
Machine learning in Linux can also be used to analyze activity logs and identify unusual patterns and potential breaches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges and risks in Linux cybersecurity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although Linux is an operating system, it has challenges and risks in cybersecurity.&lt;br&gt;
Among the next challenges are cyberattacks that can be encountered and dealt with, as well as security holes that can be exploited to gain access to protected data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Vulnerabilities and Exploits:&lt;/strong&gt; Linux, like any other operating system, can have vulnerabilities that cyber attackers can exploit. These vulnerabilities can exist in the Linux kernel, libraries, or various software packages. If left unpatched or unnoticed, they can lead to unauthorized access, data breaches, or system compromises.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Malware and Ransomware:&lt;/strong&gt; Although Linux is generally considered more secure than other operating systems, malware and ransomware targeting Linux systems do exist. Attackers can distribute malicious software that can compromise the integrity of the system, encrypt files, or even take control of the system for malicious purposes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Insider Threats:&lt;/strong&gt; Insider threats refer to the risks posed by individuals within an organization who have authorized access to Linux systems. These insiders can intentionally or unintentionally misuse their privileges to gain unauthorized access, steal sensitive information, or disrupt system operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Weak Configuration and Poor Security Practices:&lt;/strong&gt; Inadequate system configuration and poor security practices can introduce vulnerabilities into a Linux environment. Examples include weak passwords, insecure network configurations, improper access controls, unpatched software, and a lack of monitoring or intrusion detection systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Lack of User Awareness:&lt;/strong&gt; Users of Linux systems, including administrators, developers, and end-users, can inadvertently introduce security risks. This can happen through actions such as downloading and installing untrusted software, visiting malicious websites, falling victim to social engineering attacks, or neglecting basic security practices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Supply Chain Attacks:&lt;/strong&gt; Linux systems rely on numerous software packages, libraries, and dependencies obtained from various sources. Cyber attackers can compromise the integrity of these software components during the supply chain process, leading to the distribution of malicious code to Linux systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Diverse and Fragmented Ecosystem:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Linux has a diverse ecosystem with multiple distributions, each with its own unique configuration and package management system. This fragmentation can make it challenging to ensure consistent security practices across different Linux environments, leading to potential vulnerabilities and inconsistent patch management.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Limited Security Resources:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Linux distributions typically have smaller development and security teams compared to commercial operating systems. This limited resource pool can result in delayed vulnerability patching, slower response to emerging threats, and reduced overall security posture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The mitigate of challenges and risks in Linux cybersecurity&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;It is important to follow security best practices, such as :&lt;br&gt;
•regular system updates and patching&lt;br&gt;
• implementing strong access controls&lt;br&gt;
•using secure configurations&lt;br&gt;
• monitoring system logs&lt;br&gt;
• conducting security audits&lt;br&gt;
• providing user education and awareness programs &lt;br&gt;
Additionally, the leverage of security tools, such as firewalls, intrusion detection systems, and antivirus software, can further enhance the security of Linux systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Commands of Linux:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Linux commands are powerful tools for interacting with the operating system and performing various tasks. Here are some basic Linux commands:&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;ls command:&lt;br&gt;
[ ls ]&lt;/strong&gt;&lt;br&gt;
To list the files and directories inside any given directory.&lt;/p&gt;

&lt;p&gt;Some options you can use with the ls command:&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;cd command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;change directory&lt;/strong&gt; &lt;br&gt;
This command will help you to change your current directory.&lt;br&gt;
Some options you can use with the ls command:&lt;/p&gt;

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

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

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

&lt;p&gt;&lt;strong&gt;cat command:&lt;/strong&gt;&lt;br&gt;
Concatenate, or &lt;strong&gt;cat&lt;/strong&gt;, is one of the most frequently used Linux commands. It lists, combines, and writes file content to the standard output. To run the cat command, type &lt;strong&gt;cat&lt;/strong&gt; followed by the file name and its extension.&lt;br&gt;
For example:&lt;br&gt;
&lt;strong&gt;cat filename.txt&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br&gt;
1.&lt;a href="https://www.hostinger.com/tutorials/linux-commands" rel="noopener noreferrer"&gt;https://www.hostinger.com/tutorials/linux-commands&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.&lt;a href="https://buildmedia.readthedocs.org/media/pdf/lym/latest/lym.pdf" rel="noopener noreferrer"&gt;https://buildmedia.readthedocs.org/media/pdf/lym/latest/lym.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.&lt;a href="https://kingslanduniversity.com/best-linux-distros-cybersecurity/" rel="noopener noreferrer"&gt;https://kingslanduniversity.com/best-linux-distros-cybersecurity/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.&lt;a href="https://centresofexcellencenb.ca/digitalinnovation/?learning_activity=introduction-to-linux-commands-in-cyber-security" rel="noopener noreferrer"&gt;https://centresofexcellencenb.ca/digitalinnovation/?learning_activity=introduction-to-linux-commands-in-cyber-security&lt;/a&gt;&lt;/p&gt;

</description>
      <category>community</category>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>Introduction to Containers</title>
      <dc:creator>Zahraa Jawad</dc:creator>
      <pubDate>Sun, 07 May 2023 19:19:29 +0000</pubDate>
      <link>https://forem.com/zahraajawad/introduction-to-containers-ljf</link>
      <guid>https://forem.com/zahraajawad/introduction-to-containers-ljf</guid>
      <description>&lt;p&gt;**Outline&lt;/p&gt;

&lt;p&gt; Introduction to Containers&lt;br&gt;
 Container Architecture&lt;br&gt;
 Benefits of Containers&lt;br&gt;
 Container Orchestration&lt;br&gt;
 Challenges of Containerization&lt;br&gt;
 Introduction to AWS Container Types&lt;br&gt;
 Docker Engine&lt;br&gt;
 Choosing the Right Container Type&lt;br&gt;
 The Future of Containers&lt;br&gt;
 Conclusion**&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction to Containers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Containers are a type of virtualization technology that allows for the creation and deployment of applications in a lightweight, portable manner. Unlike traditional virtual machines, which require a full operating system to be installed, containers share the host operating system kernel, making them much more efficient and faster to deploy.&lt;br&gt;
Containers also provide a level of isolation between applications, ensuring that they do not interfere with each other or with the host system. This makes them ideal for use in cloud computing environments, where multiple applications may be running on the same hardware.&lt;br&gt;
The virtual machines and containers have differed in several ways, but the primary difference is that containers provide a way to virtualize an operating system (OS) so that multiple workloads can run on a single operating system instance. With VMs, the hardware is being virtualized to run multiple operating system instances.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Container Architecture&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Containers are built using a layered architecture, with each layer providing a specific function. The base layer is the host operating system, followed by the container runtime, which manages the creation and execution of containers. On top of this is the container image, which contains all the necessary files and dependencies to run an application. Finally, the container itself is created from the image and can be customized with additional configuration settings. This layered approach allows for greater flexibility and scalability when deploying applications in containers.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Benefits of Containers&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Containers offer several key benefits over traditional virtualization technologies. First and foremost, they are much more efficient and lightweight, allowing for faster deployment times and better resource utilization. They also provide a high level of portability, making it easy to move applications between different environments and platforms. Containers also offer greater flexibility and scalability, as they can be easily scaled up or down depending on demand. Finally, containers provide a higher level of security and isolation than traditional virtual machines, helping to protect against cyber threats and data breaches. Containers require less system resources than traditional or hardware virtual machine environments because they don't include operating system images. Applications running in containers can be deployed easily to multiple different operating systems and hardware platforms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Container Orchestration&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;As the number of containers in an environment grows, managing them becomes increasingly complex. This is where container orchestration comes in, providing a way to automate the deployment, scaling, and management of containers across multiple hosts. Popular container orchestration tools include:&lt;br&gt;
-Kubernetes&lt;br&gt;
-Docker Swarm&lt;br&gt;
-Apache Mesos.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frscww1zl2d56xcj1mkhx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frscww1zl2d56xcj1mkhx.png" alt=" " width="475" height="267"&gt;&lt;/a&gt;&lt;br&gt;
These tools provide a range of features, such as :&lt;br&gt;
-Automatic load balancing&lt;br&gt;
-Service discovery&lt;br&gt;
-Rolling updates make it easier to manage large-scale container deployments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges of Containerization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While containers offer many benefits, they also present several challenges that must be addressed.&lt;br&gt;
One of the biggest challenges is managing container sprawl, as the number of containers in an environment can quickly become overwhelming. This requires careful planning and management to ensure that resources are used efficiently.&lt;br&gt;
Another challenge is ensuring the security of containers, particularly when they are deployed in shared environments. This requires a range of security measures, such as network segmentation, access controls, and vulnerability scanning, to protect against cyber threats and data breaches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS Container Types&lt;/strong&gt; &lt;br&gt;
AWS provides different types of containers for developers to choose from based on their specific needs. These containers are designed to provide a scalable and secure environment for running applications in the cloud. The most popular container types in AWS include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon Elastic Container Service (ECS)&lt;/li&gt;
&lt;li&gt;Amazon Elastic Kubernetes Service (EKS)&lt;/li&gt;
&lt;li&gt;AWS Fargate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8wbklccqlzyso8j0tak8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8wbklccqlzyso8j0tak8.png" alt=" " width="800" height="254"&gt;&lt;/a&gt;&lt;br&gt;
Each of these containers has its unique features and benefits that make them suitable for different use cases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Elastic Container Service (ECS)&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Amazon Elastic Container Service (ECS) is a fully managed container service that makes it easy to run, stop, and manage Docker containers on a cluster. With ECS, developers can deploy their applications quickly and scale them easily to meet changing traffic demands. ECS supports both Linux and Windows containers, and it integrates seamlessly with other AWS services like Elastic Load Balancing, Amazon CloudWatch, and AWS Identity and Access Management (IAM).&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Amazon Elastic Kubernetes Service (EKS)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Amazon Elastic Kubernetes Service (EKS) is a fully managed Kubernetes service that makes it easy to deploy, manage, and scale containerized applications using Kubernetes on AWS.&lt;br&gt;
EKS provides a highly available and secure platform for running Kubernetes clusters, and it integrates seamlessly with other AWS services like Elastic Load Balancing, Amazon CloudWatch, and AWS Identity and Access Management (IAM).&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;AWS Fargate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AWS Fargate is a serverless compute engine for containers that allows developers to run containers without having to manage the underlying infrastructure. With Fargate, developers can focus on building and deploying their applications without worrying about the servers or clusters they run on.&lt;br&gt;
Fargate provides a secure and scalable environment for running containers, and it integrates seamlessly with other AWS services like Elastic Load Balancing, Amazon CloudWatch, and AWS Identity and Access Management (IAM).&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Docker Engine&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Docker Engine is an open source containerization technology for building and containerizing your applications .&lt;br&gt;
Docker Engine acts as a client-server application with:&lt;br&gt;
-A server with a long-running daemon process dockerd.&lt;br&gt;
-APIs which specify interfaces that programs can use to talk to and instruct the Docker daemon.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A command line interface (CLI) client docker. The CLI uses Docker APIs to control or interact with the Docker daemon through scripting or direct CLI commands. Many other Docker applications use the underlying API and CLI. The daemon creates and manage Docker objects, such as images, containers, networks, and volumes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Choosing the Right Container Type&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;When choosing a container type in AWS, developers should consider factors like the complexity of their application, the level of control they need over the underlying infrastructure, and the desired level of scalability and availability. For simple applications, AWS Fargate may be the best choice as it eliminates the need for managing infrastructure. For more complex applications, Amazon Elastic Container Service (ECS) or Amazon Elastic Kubernetes Service (EKS) may provide more control and flexibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Future of Containers&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Containers are rapidly becoming the standard for application deployment and management, with more and more organizations adopting containerization as a core part of their IT strategy. As container technology continues to evolve, we can expect to see even greater levels of efficiency, scalability, and flexibility. In the future, we may also see new use cases for containers, such as in the Internet of Things (IoT) and edge computing. With their lightweight and portable nature, containers are well-suited for these emerging technologies and could play a key role in shaping the future of computing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AWS provides a wide range of container types that give developers the flexibility and scalability they need to run their applications in the cloud. By choosing the right container type based on their specific needs, developers can build and deploy their applications quickly and efficiently.&lt;br&gt;
Whether it's Amazon Elastic Container Service (ECS), Amazon Elastic Kubernetes Service (EKS), or AWS Fargate, AWS has a container type that can meet the needs of any application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://aws.amazon.com/containers/services/" rel="noopener noreferrer"&gt;https://aws.amazon.com/containers/services/&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/whitepapers/latest/aws-overview/containers.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/whitepapers/latest/aws-overview/containers.html&lt;/a&gt; &lt;a href="https://docs.docker.com/engine/" rel="noopener noreferrer"&gt;https://docs.docker.com/engine/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>containers</category>
      <category>awscommunitybuilders</category>
      <category>community</category>
    </item>
  </channel>
</rss>
