<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AWS UG Jaipur</title>
    <description>The latest articles on DEV Community by AWS UG Jaipur (@awsugjaipur).</description>
    <link>https://dev.to/awsugjaipur</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%2Forganization%2Fprofile_image%2F4420%2F20258cff-37db-499d-bd26-bd6c5d8e801b.jpeg</url>
      <title>DEV Community: AWS UG Jaipur</title>
      <link>https://dev.to/awsugjaipur</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/awsugjaipur"/>
    <language>en</language>
    <item>
      <title>Learn &amp; Implement Contest - AWS UG OSTech Conf 2021</title>
      <dc:creator>awsugjaipur</dc:creator>
      <pubDate>Wed, 14 Jul 2021 16:38:10 +0000</pubDate>
      <link>https://dev.to/awsugjaipur/learn-implement-contest-aws-ug-ostech-conf-2021-3lfn</link>
      <guid>https://dev.to/awsugjaipur/learn-implement-contest-aws-ug-ostech-conf-2021-3lfn</guid>
      <description>&lt;p&gt;This contest is a part of &lt;a href="https://awsugjaipur.tech" rel="noopener noreferrer"&gt;AWS UG OSTech Conf 2021&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisite: Must have access to AWS console&lt;br&gt;
Disclaimer: We have used AWS EC2 t2.micro instance that is free tier eligible still can cause billing, It's user responsibility to terminate instance after performing the contest.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step1: Launching EC2 instance
&lt;/h2&gt;

&lt;p&gt;1.1) In AWS Console, search for EC2 and click on that service, you will be redirected to the AWS EC2 page as follows and then click on Launch Instance.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhxpn57brfpofhyi9jdjv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhxpn57brfpofhyi9jdjv.jpeg" alt="Launching EC2 Instance"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.2) To run EC2 successfully, select an &lt;strong&gt;Amazon Machine Image (AMI)&lt;/strong&gt;. AMI contains all the software configurations (Operating System, Application Server, and applications) required to launch your instance. In this case, we will pick Amazon Linux AMI.&lt;/p&gt;

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

&lt;p&gt;1.3) Now, select the &lt;strong&gt;Instance Type&lt;/strong&gt; that determines the type of CPU, storage, network capacity, and memory needed during the installation. Choose &lt;strong&gt;t2.micro&lt;/strong&gt;, and hit the next button as shown below:&lt;/p&gt;

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

&lt;p&gt;1.4) Click the &lt;strong&gt;Next&lt;/strong&gt; button until you reach the Configure Security Group page to retain the default settings. A security group is a set of firewall rules that control the traffic for your instance. On this page, you can add rules to allow specific traffic to reach your instance.&lt;/p&gt;

&lt;p&gt;For example, if you want to set up a web server and allow internet traffic to reach your instance, add rules that allow unrestricted access to the HTTP and HTTPS ports.&lt;br&gt;
It's must to put 22 port on my_ip field.&lt;br&gt;
Enter the Security Group name and then hit the &lt;strong&gt;Review and Launch button&lt;/strong&gt;.  &lt;/p&gt;

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

&lt;p&gt;1.5) After hitting the Launch button you will see a pop-up page that requires you to select a &lt;strong&gt;Key Pair&lt;/strong&gt;. This contains both a public and private key folder that is used to connect to your EC2 Instance securely via SSH. Click on the &lt;strong&gt;create a new key pair&lt;/strong&gt; button and give a name to the key pair. Go ahead and download your key pair.&lt;/p&gt;

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

&lt;p&gt;1.6) Save your key file to a safe place on your system and then click on Launch Instances, it will direct you to the launching page. Hit the &lt;strong&gt;View Instances&lt;/strong&gt; button to access the EC2 Instances page, then click on connect and you will see several options to connect your instance, it will only need SSH to be installed and the &lt;strong&gt;pem key&lt;/strong&gt; that you have downloaded, mentioned in the previous step.&lt;/p&gt;

&lt;p&gt;Copy &lt;strong&gt;ssh&lt;/strong&gt; command provided there and use it to connect, you can use Git Bash, CMD, or Putty.&lt;/p&gt;

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

&lt;p&gt;2.1) After connecting to the instance via SSH, now run the below commands -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; sudo su 
 yum update -y
 yum install docker git -y
 systemctl start docker
 usermod -a -G docker ec2-user
 systemctl enable docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands will install Docker and Git in your AMI, and enable your Docker service.  &lt;/p&gt;

&lt;p&gt;2.2) Now you have to clone a repository and modify a file by replacing AWS with your &lt;strong&gt;Full Name&lt;/strong&gt; by using the below commands -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; git clone https://github.com/AWS-User-Group-Jaipur-Rajasthan/OSTechConf21.git
 cd OSTechConf21/contests/learn-and-implement/
 sed -i 's/I am/AWS/g' learn/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: Don't forget to replace AWS with your name like :-&lt;br&gt;
&lt;code&gt;$ sed -i 's/I am/Elon Musk/g' learn/index.html&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 3: Build Image and Run Container
&lt;/h2&gt;

&lt;p&gt;First, check that you are in the &lt;strong&gt;learn-and-implement/&lt;/strong&gt; folder and a &lt;strong&gt;Dockerfile&lt;/strong&gt; is present.&lt;br&gt;
&lt;em&gt;This command will build the image&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t 'ostechconf21' .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This command will run your docker container in which web page is hosted&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -p 80:80 -d ostechconf21
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;It's Done! 🥳&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Final Steps
&lt;/h2&gt;

&lt;p&gt;4.1) Open the &lt;strong&gt;Amazon EC2 console&lt;/strong&gt; and in the navigation pane, choose Instances and select your instance.&lt;/p&gt;

&lt;p&gt;The following information is available on the Networking tab:&lt;br&gt;
Public IPv4 DNS — The external DNS hostname.&lt;/p&gt;

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

&lt;p&gt;4.2) Copy the Public DNS and paste that in any browser. &lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Congratulations !! If you can see your webpage with your name as above screenshot.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;4.3) Now go to EC2 console and copy instance Public DNS and open that in any browser and share the screenshot as given on contest page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with AWS UG Jaipur:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/c/AWSUserGroupJaipurRajasthan/" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.linkedin.com/company/awsjaipur" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; | &lt;a href="https://github.com/AWS-User-Group-Jaipur-Rajasthan" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>docker</category>
      <category>opensource</category>
      <category>awsugjaipur</category>
    </item>
  </channel>
</rss>
