<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manish Sharma on Medium]]></title>
        <description><![CDATA[Stories by Manish Sharma on Medium]]></description>
        <link>https://medium.com/@sharma.money?source=rss-487a884199c9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Manish Sharma on Medium</title>
            <link>https://medium.com/@sharma.money?source=rss-487a884199c9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 07:18:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sharma.money/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Week 7 — Project — Create t2.micro Instance with Apache Webserver]]></title>
            <link>https://medium.com/@sharma.money/week-7-project-create-t2-micro-instance-with-apache-webserver-ea95aacc9b1d?source=rss-487a884199c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea95aacc9b1d</guid>
            <dc:creator><![CDATA[Manish Sharma]]></dc:creator>
            <pubDate>Sun, 29 Oct 2023 12:27:11 GMT</pubDate>
            <atom:updated>2023-10-29T12:27:11.252Z</atom:updated>
            <content:encoded><![CDATA[<p>Week 7 — Project — Create t2.micro Instance with Apache Webserver</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*nmBpPnUGHUBWZEcWIJ-bIQ.png" /></figure><p><strong>Project Scope</strong> -</p><ul><li>Create t2.micro EC2 instance</li><li>Install Apache Web Server on EC2 instance</li></ul><p><strong>Success Criteria</strong></p><ul><li>Webserver should be accessible using public IP address.</li></ul><p>Process to create EC2 Instance</p><p>Create EC2 Instance</p><p>Login to AWS Console</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*P97oTyaeOJVhmTje96IsyA.png" /></figure><p>Click on <strong>EC2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*3rDjFARIpn9iBYkqKzjRtA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*WJGipudLd0xA0OwPSj2Y0A.png" /></figure><p>Type in Server name</p><p>Choose <strong>Amazon Linux 2023 AMI Image</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*hpF7iK6ieQ_VvA3YWP80Cg.png" /></figure><p>Choose instance type as <strong>t2.micro</strong></p><p>Choose <strong>existing key pair</strong></p><p>Create <strong>new security group</strong></p><p>Under <strong>Firewall </strong>Security group, Choose <strong>Allow http traffic from the internet</strong></p><p>Scroll down to the bottom</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*HwfOu-UepQyzqamUoXtQPA.png" /></figure><p>Expand <strong>Advanced details</strong></p><p>Scroll down to the bottom again under <strong>Advanced details</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*EqlGYa88Sv5mb6w8jzRJXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dtZymnNqWA3tHQFiRNSwCw.png" /></figure><p>Under <strong>User data — optional</strong> option, Copy and paste the above mentioned script ( script source — Neal’e AWS Course )</p><p><strong>What is User data — optional option ?</strong></p><p>AWS userdata is the set of commands/data you can provide to a instance at launch time.</p><p>For example if you are launching an ec2 instance and want to have apache webserver installed on the newly launched ec2, than you can provide set of bash commands in the userdata field of AWSvec2 config page.</p><p>This Script will,</p><ul><li>Install all updates</li><li>Install Apache Web Server</li><li>Copy subnet ID to index.txt file</li><li>Copy output from index.txt to index.html file</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*eCOJS63yhSDzwmCUHFotRA.png" /></figure><p>Click <strong>Launch instance</strong> to create instance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*IhUul_MmzdMFv_HCbBAKVg.png" /></figure><p>Once instance is created, Click on instance and note down public IP address of the instance.</p><p>Type IP address in new browser window. Apache webserver web page is available via public IP address.</p><p><strong>Final Result</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2XWqym_3CXabfGYNaLVNPA.png" /></figure><p><strong>Errors encountered and their solutions.</strong></p><p>My Web server was not working fine, so i ran the commands manually and received following error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*Dl1j-qUJhoxG3WRiy5Faqg.png" /></figure><p>I had to add Read/Write permission for index.txt and index.html file so that commands can work.</p><p>chmod 660 index.txt</p><p>chmod 660 index.html</p><p>I also recreated the instance and webserver was installed along with installation and it worked fine without adding permissions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea95aacc9b1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Project scope]]></title>
            <link>https://medium.com/@sharma.money/project-scope-223dd7bbea1b?source=rss-487a884199c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/223dd7bbea1b</guid>
            <dc:creator><![CDATA[Manish Sharma]]></dc:creator>
            <pubDate>Sun, 24 Sep 2023 14:15:19 GMT</pubDate>
            <atom:updated>2023-09-24T14:15:19.849Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Project scope</strong></p><p>To create Static Website in AWS S3 Bucket using AWS Console.</p><p><strong>What is AWS S3 Bucket</strong></p><p>AWS Cloud offers different types of storage services</p><p>Amazon Elastic Block Store ( EBS ) — Block Storage</p><p>Amazon Elastic File System ( EFS ) — File Storage</p><p>Amazon Simple Storage Service (S3) — Object Storage</p><p>In this project we will create a S3 bucket.</p><p><strong>AWS S3 </strong>— It provides object-based storage, where data is stored inside S3 buckets in distinct units called objects instead of files.</p><p>AWS S3 offers following features -</p><ol><li>Scalability</li><li>Data Availability</li><li>Security</li><li>Performance</li></ol><p><strong>Prerequisite</strong></p><p>AWS Free Tier Account</p><p><strong>How to create S3 Bucket.</strong></p><p>Login to AWS Free Tier Account</p><p>In the Search box, Search <strong>S3</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*oPBua72H-mZN9Q3Dqvc3-A.png" /></figure><p>Click S3</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WmG_VDaW2nyM7evgqlo0NQ.png" /></figure><p>Click on Create bucket</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fIRpPnxHNSdeCRcOsW1OPw.png" /></figure><p>Provide a unique bucket name</p><p>Note:- <em>Amazon S3 supports global buckets, which means that each bucket name must be unique across all AWS accounts in all the AWS Regions within a partition</em></p><p>Keep all other settings as default</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*Z8nela7AmPQZ115Grsk2CA.png" /></figure><p>Click Create bucket</p><p>This will create a new S3 bucket.</p><p>Click on newly created bucket name .</p><p>Now we need to upload websites files to this bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kOflSBEXCHt2UrII7uItbw.png" /></figure><p>Click on Upload</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iuSpAwFtroRqmT_x3RbTNg.png" /></figure><p>Upload index.html</p><p>Now we need to enable static website on this S3 bucket</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQuE6C8rWh0lJpHIVyJuYQ.png" /></figure><p>Click on properties tab and scroll down to the bottom</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T8jVel98szeNuXJsL19BkQ.png" /></figure><p>Static website hosting is currently Disabled. Click on Edit to enable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*90OiC6H_JK2epACZ5LTXAA.png" /></figure><p>Type Index document and Error document name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZpYOtm4gqhOUDDlUXZSgtg.png" /></figure><p>Static website has been created.</p><p>Copy the URL and paste in in new browser window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*j03szftZ9vdnARDFDtD8vQ.png" /></figure><p>You will notice 403 Forbidden error.</p><p>We see this error as we still have not configured any permissions on the static website and the error is expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N5GH_YLVqpV6Pl9Z8xKpyw.png" /></figure><p>Under Permissions tab you will notice that “Block public access” is On by default.</p><p>Click Edit to Turn off this setting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*WsvyHS6geH5tjg7atQtmyA.png" /></figure><p>Uncheck “Block all public Access”</p><p>Now we need to create a bucket policy to allow access to the website.</p><p>This can be done by 2 methods.</p><ol><li>using ACL</li><li>Using bucket policy</li></ol><p>Using bucket policy is the recommended method.</p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Sid&quot;: &quot;AllowPublicAccesstoObjects&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Principal&quot;: &quot;*&quot;,<br>            &quot;Action&quot;: &quot;s3:GetObject&quot;,<br>            &quot;Resource&quot;: &quot;arn:aws:s3:::manish-websitejk527527/*&quot;<br>        }<br>    ]<br>}<br></pre><p>Click edit button ( next to bucket policy ) to insert the above code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*eazWCtnx6i8Wm0aAr99D5A.png" /></figure><p>Your Bucket policy page will look like this .</p><p>Now under properties tab, scroll down to the bottom of the page and copy the Bucket website endpoint URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZpYOtm4gqhOUDDlUXZSgtg.png" /></figure><p>Open a new Browser window and paste the URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wxzTX2LyKDOlEM5NaN6TGw.png" /></figure><p>Static Website is running now.</p><p><strong>Learnings from this project</strong></p><p>Errors encountered during this project</p><p><strong>Error 1</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*Hxs5PaHG4zHTonbudT_KGQ.png" /></figure><p><strong>Cause </strong>— We cannot use upper case characters in bucket name</p><p><strong>Solution </strong>— Do not use uppercase characters and bucket name should be unique.</p><p><strong>Error 2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*j03szftZ9vdnARDFDtD8vQ.png" /></figure><p><strong>Cause </strong>— No permissions are defined</p><p><strong>Solution </strong>— Define permissions using ACL or bucket policy to access website.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=223dd7bbea1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Project Scope]]></title>
            <link>https://medium.com/@sharma.money/project-scope-8b21eccc4055?source=rss-487a884199c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b21eccc4055</guid>
            <dc:creator><![CDATA[Manish Sharma]]></dc:creator>
            <pubDate>Sun, 24 Sep 2023 14:14:52 GMT</pubDate>
            <atom:updated>2023-09-24T14:14:52.787Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Project Scope</strong></p><p>Enable CloudFront for S3 Static website</p><p><strong>What is CloudFront</strong></p><p>Amazon CloudFront is a content delivery network (CDN) service built for high performance, security, and developer convenience.</p><p>CloudFront offers following features</p><ul><li>Stores and Delivers Content with Speed and Scale</li><li>Secures the content</li><li>Real-time metrics and logging</li><li>Cost effective</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*XY764Nx4L7NvTOMWakZR3w.png" /><figcaption>Image Source — <a href="https://aws.amazon.com/blogs/networking-and-content-delivery/amazon-s3-amazon-cloudfront-a-match-made-in-the-cloud/">https://aws.amazon.com/blogs/networking-and-content-delivery/amazon-s3-amazon-cloudfront-a-match-made-in-the-cloud/</a></figcaption></figure><p>Instead of going directly to AWS S3 bucket, we place Amazon CloudFront in front in between to secure our content/website and to deliver content across Globe using AWS Global Infrastructure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AJR7is8szp1TGNgRVYHheg.png" /><figcaption>Image source — <a href="https://aws.amazon.com/cloudfront/features/?whats-new-cloudfront.sort-by=item.additionalFields.postDateTime&amp;whats-new-cloudfront.sort-order=desc">https://aws.amazon.com/cloudfront/features/?whats-new-cloudfront.sort-by=item.additionalFields.postDateTime&amp;whats-new-cloudfront.sort-order=desc</a></figcaption></figure><p>How to enable CloudFront for Static website in S3.</p><p>Login to AWS Free Tier account</p><p>In the search box type Cloudfront</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P7G6xIQfgUkTqDFmQqvAJQ.png" /></figure><p>Click create distribution</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3IFI0CKYYG0V-_73NBMcaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZpYOtm4gqhOUDDlUXZSgtg.png" /></figure><p>Copy the Bucket website endpoint URL from S3 Static website hosting properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*RO4PbdV6wkXCy4e36gG4zg.png" /></figure><p>Paste the URL copied from S3 bucket properties to Origin domain and remove http:// from the URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*LgoH31S9LmR-jijX2PCzvQ.png" /></figure><p>Keep other settings default</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*bRr8C2hKfNoe5-VnOn90gA.png" /></figure><p>Under Viewer make sure to select Redirect HTTP to HTTPS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*uZCIt41oX76DP99G3o-oNw.png" /></figure><p>Under Web Application Firewall ( WAF )</p><p>Enable security protections .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*fBG0CO6KeN_YHYaKnqZmoA.png" /></figure><p>Under settings → Price class make sure “ Use all edge locations (best performance)“ is selected</p><p>Click Create distribution.</p><p>It will take few minutes for distribution to be created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QmbDZQOKsH5mP1BkYytLkQ.png" /></figure><p>Once distribution is created, click on distribution</p><p>Under General tab, copy Distribution domain name URL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L9XIK0rPVAAFeOTxlmrM9w.png" /></figure><p>Paste Distribution domain name URL in new browser window</p><p>You are now accessing S3 Static website via CloudFront domain name.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b21eccc4055" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>