<?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: Sanamdeep Singh</title>
    <description>The latest articles on DEV Community by Sanamdeep Singh (@sanamsoodan).</description>
    <link>https://dev.to/sanamsoodan</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%2F146324%2F7b5dfeac-b243-4370-b3ec-6191dc72c32c.jpg</url>
      <title>DEV Community: Sanamdeep Singh</title>
      <link>https://dev.to/sanamsoodan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sanamsoodan"/>
    <language>en</language>
    <item>
      <title>MarkDown for beginners</title>
      <dc:creator>Sanamdeep Singh</dc:creator>
      <pubDate>Mon, 25 Mar 2019 02:37:56 +0000</pubDate>
      <link>https://dev.to/sanamsoodan/markdown-for-beginners-5ako</link>
      <guid>https://dev.to/sanamsoodan/markdown-for-beginners-5ako</guid>
      <description>&lt;h2&gt;
  
  
  What is markdown?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Lightweight markup language&lt;/li&gt;
&lt;li&gt;Can be converted into HTML/XHTML and other formats&lt;/li&gt;
&lt;li&gt; It's main purpose is readability and ease of use&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is it used for?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Readme Files(GitHub, etc)&lt;/li&gt;
&lt;li&gt;Forums and Blogs&lt;/li&gt;
&lt;li&gt; Used in may static site generators&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some basic things you can format &lt;/p&gt;

&lt;p&gt;Headings    Blocks of Code&lt;/p&gt;

&lt;p&gt;Lists            Images&lt;/p&gt;

&lt;p&gt;Emphasis     Blockquotes&lt;/p&gt;

&lt;p&gt;Links           Horizontal Rules&lt;/p&gt;

&lt;h2&gt;
  
  
  Headings
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# H1 Heading
## H2 Heading
### H3 Heading
#### H4 Heading
##### H5 Heading
###### H6 Heading
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  H1 Heading
&lt;/h1&gt;

&lt;h2&gt;
  
  
  H2 Heading
&lt;/h2&gt;

&lt;h3&gt;
  
  
  H3 Heading
&lt;/h3&gt;

&lt;h4&gt;
  
  
  H4 Heading
&lt;/h4&gt;

&lt;h5&gt;
  
  
  H5 Heading
&lt;/h5&gt;

&lt;h6&gt;
  
  
  H6 Heading
&lt;/h6&gt;




&lt;h2&gt;
  
  
  Italics
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*This text is in italics*

_This text_ is in italics
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This text is in italics&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This text&lt;/em&gt; is in &lt;/p&gt;




&lt;h2&gt;
  
  
  Strong
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; **This text is in strong**

__This text__ is in strong
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;This text is in italics&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This text&lt;/strong&gt; is in italics&lt;/p&gt;




&lt;h2&gt;
  
  
  Strikethrough
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~~This text~~ is strikethough
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;del&gt;This text&lt;/del&gt; is strikethough&lt;/p&gt;




&lt;h2&gt;
  
  
  Horizontal Rule
&lt;/h2&gt;



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






&lt;h2&gt;
  
  
  show speacial character
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\*This text is in italics\*
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;*This text is in italics*&lt;/p&gt;




&lt;h2&gt;
  
  
  Blockquotes
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; This is a Quote
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This is a Quote&lt;/p&gt;
&lt;/blockquote&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[https://www.sanamdeep.dev](https://www.sanamdeep.dev)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.sanamdeep.dev"&gt;https://www.sanamdeep.dev&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  show title on hover
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[https://www.sanamdeep.dev](https://www.sanamdeep.dev "sanamdeep.dev")
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;[&lt;a href="https://www.sanamdeep.dev%5D(https://www.sanamdeep.dev"&gt;https://www.sanamdeep.dev](https://www.sanamdeep.dev&lt;/a&gt; "sanamdeep.&lt;/p&gt;




&lt;h2&gt;
  
  
  Unordered Lists
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Item 1
  * Item 1.1
    * Item 1.1.1
* Item 2
  * Item 2.1
    * Item 2.1.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Item 1

&lt;ul&gt;
&lt;li&gt;Item 1.1&lt;/li&gt;
&lt;li&gt;Item 1.1.1&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Item 2

&lt;ul&gt;
&lt;li&gt;Item 2.1&lt;/li&gt;
&lt;li&gt;Item 2.1.1&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Ordered List
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Item
    1. Item1.1
        1. Item 1.2
2. Item 2
    1. Item 2.1
        1. Item 2.1.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Item

&lt;ol&gt;
&lt;li&gt;Item1.1

&lt;ol&gt;
&lt;li&gt;Item 1.2&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Item 2

&lt;ol&gt;
&lt;li&gt;Item 2.1

&lt;ol&gt;
&lt;li&gt;Item 2.1.1&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Blockquotes
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`&amp;lt;p&amp;gt;This is a paragraph&amp;lt;/p&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a paragraph&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Images
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;![Markdown Logo](https://markdown-here.com/img/icon256.png)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pFn86d2h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://markdown-here.com/img/icon256.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pFn86d2h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://markdown-here.com/img/icon256.png" alt="Markdown Logo"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  GitHub markdown
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Code Blocks
&lt;/h3&gt;

&lt;blockquote&gt;


```bash &lt;br&gt;

npm install &lt;br&gt;

```

 &lt;br&gt;
&lt;/blockquote&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;


```javascript &lt;br&gt;
  function add(num1, num2) { &lt;br&gt;
    return num1 + num2; &lt;br&gt;
  } &lt;br&gt;
```


&lt;/blockquote&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;num1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;num2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;num1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;num2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;


```python &lt;br&gt;
  def add(num1, num2): &lt;br&gt;
    return num1 + num2 &lt;br&gt;
```

 &lt;br&gt;
&lt;/blockquote&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;num2&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;num1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;num2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;






&lt;h3&gt;
  
  
  Tables
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;| Name    |  Email   |
| ----    |  ------  |
| John Doe | john@gmail.com |
| Jane Doe | john@gmail.com |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Email&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;John Doe&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:john@gmail.com"&gt;john@gmail.com&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Jane Doe&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:john@gmail.com"&gt;john@gmail.com&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Task Lists
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* [x] Task 1 completed
* [x] Task 2 completed
* [ ] Task 3 not completed
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;[x] Task 1 completed&lt;/li&gt;
&lt;li&gt;[x] Task 2 completed&lt;/li&gt;
&lt;li&gt;[ ] Task 3 not completed&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>markdown</category>
    </item>
    <item>
      <title>Host a Website Using AWS CloudFront, Origin Access Identity, S3 without Static Website Hosting</title>
      <dc:creator>Sanamdeep Singh</dc:creator>
      <pubDate>Sun, 17 Mar 2019 05:06:39 +0000</pubDate>
      <link>https://dev.to/sanamsoodan/host-a-website-using-aws-cloudfront-origin-access-identity-s3-without-static-website-hosting-5eg7</link>
      <guid>https://dev.to/sanamsoodan/host-a-website-using-aws-cloudfront-origin-access-identity-s3-without-static-website-hosting-5eg7</guid>
      <description>

&lt;p&gt;This Second tutorial is to host a website on AWS and Restricting Access to Amazon S3 Content by Using an Origin Access Identity.&lt;/p&gt;

&lt;p&gt;Step 1: Register a Domain&lt;br&gt;
Buy a domain of your choice. eg sanamdeep.com. You can buy your domain from AWS, Google domains, Go Daddy and other providers. For the scope of this blog we will consider domain to be sanamdeep.com . You will use the domain you have chosen and replace them with the usage in below steps.&lt;br&gt;
To buy domain name from AWS go to Route53 and check for available domains of your choice.&lt;br&gt;
Step 2: AWS Setup&lt;br&gt;
This Step involves multiple substeps.&lt;/p&gt;

&lt;p&gt;Setting up ACM or AWS Certificate Manager.&lt;br&gt;
ACM handles the complexity of creating and managing public SSL/TLS certificates for your AWS based websites and applications.&lt;br&gt;
Go to AWS Certificate Manager and select “Request a certificate” &amp;gt; “Request a public certificate” &amp;gt; Under domain name enter sanamdeep.com and *.sanamdeep.com . The second domain name is for all the subdomains like &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt; . &amp;gt; choose “DNS validation” &amp;gt; Review &amp;gt; confirm and request.&lt;br&gt;
After this step if you have bought your domain from AWS then you will have to wait for 10–15 minutes while the certificate is issued. Otherwise if you have bought your domain from a third party domain provider then you will need to click on “ Export DNS configuration to a file” option inside your requested certificate and copy the DNS Name and Values to your domain settings.&lt;br&gt;
Eg for Google Domain you can go to your particular domain and under DNS &amp;gt; Custom resource records you will add the DNS entries. Only enter unique entries.&lt;br&gt;
Only after this step is completed will AWS take 10–15 minutes to issue a certificate.&lt;br&gt;
Set up S3 Buckets&lt;br&gt;
Go to S3 and make bucket &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt; . For the purpose of a sample website use a Hello world HTML file.&lt;br&gt;
Setting up CloudFront&lt;br&gt;
Now we will set up two CloudFront one for sanamdeep.com and the other for &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt;&lt;br&gt;
First lets create CloudFront from &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt;.&lt;br&gt;
Create Distribution &amp;gt; Web &amp;gt; Get Started &amp;gt; Under Origin domain path you need to add S3 bucket for &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt;.&lt;br&gt;
Note: Select the option displayed under Origin domain path.&lt;br&gt;
Upon entering the Origin domain path the Origin ID is automatically populated.&lt;br&gt;
Check yes under Restrict Bucket Access. Now you will see Origin Access Identity option. If you have not created Identity before select yes else use an existing one.&lt;br&gt;
Under Grant Read Permissions on Bucket choose yes. This will automatically add a bucket policy to grant permission to CloudFront to access S3 objects.&lt;br&gt;
Under Default Cache Behavior Settings &amp;gt; Viewer Protocol Policy choose Redirect Http to Https.&lt;br&gt;
Under Distribution Settings &amp;gt; Alternate Domain Names(CNAMEs) &amp;gt; enter &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt;&lt;br&gt;
Under Distribution Settings &amp;gt; SSL Certificate &amp;gt;choose Custom SSL certificate and choose your certificate&lt;br&gt;
Under Distribution Settings &amp;gt; Default Root Object type index.html&lt;br&gt;
Click Create Distribution. After this CloudFront will take 20–30 minutes to be deployed.&lt;br&gt;
Repeat the process for sanamdeep.com&lt;br&gt;
since we created only one bucket we will use &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt; here as well.&lt;br&gt;
Use sanamdeep.com as the Alternate Domain Names(CNAMEs)&lt;br&gt;
enter index.html under Distribution Settings &amp;gt; Default Root Object for sanamdeep.com&lt;br&gt;
Rest of the settings will be similar to the previous CloudFront.&lt;br&gt;
Note: The purpose of this CloudFront is to redirect traffic coming to sanamdeep.com to redirect to &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt; bucket. So the settings would remain the same.&lt;br&gt;
Setting up Route53&lt;br&gt;
In this step Under Hosted Zones &amp;gt; Create Hosted Zones&lt;br&gt;
Enter Domain as sanamdeep.com and click create.&lt;br&gt;
Now under the newly created hosted zone sanamdeep.com you will find two automatically created record sets.&lt;br&gt;
One of them will have the Name servers with four entries.&lt;br&gt;
Now Click Create Record Sets &amp;gt;under Name put sanamdeep.com &amp;gt;&lt;br&gt;
check Alias as yes &amp;gt; choose alias target as the corresponding CloudFront. Make sure to choose the right alias Target.&lt;br&gt;
Create a Record Set for &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt; following the above steps.&lt;br&gt;
Copying the DNS entries&lt;br&gt;
For Third party providers we already copied the DNS entries from certificate manager. But for people using domain from AWS you will need to copy the DNS entries under Route53 if not added automatically.&lt;br&gt;
Copying Name Servers&lt;br&gt;
This step is for domains from third-party providers copy the Name Serversgenerated in Route53 and add them to the domain. Eg for google domains they can be added under DNS&amp;gt; Name Servers&lt;br&gt;
After this step, you can open your website either by &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt; or sanamdeep.com. Both will be redirected to &lt;a href="https://www.sanamdeep.com"&gt;https://www.sanamdeep.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Changes not reflecting on website&lt;br&gt;
Also in case, you make the change to your website by changing contents in S3 bucket. CloudFront can take some time before reflecting the changes automatically. A Faster way is to go to the CloudFront &amp;gt; Invalidations &amp;gt; Create Invalidation and enter /* if you want to invalidate all the files. After creating the invalidation on both &lt;a href="http://www.sanamdeep.com"&gt;www.sanamdeep.com&lt;/a&gt; and sanamdeep.com, the changes will be reflected immediately.&lt;/p&gt;


</description>
      <category>aws</category>
      <category>websitehosting</category>
      <category>cloudfront</category>
      <category>s3</category>
    </item>
    <item>
      <title>How to host a Static website using Amazon CloudFront, Route53, Certificate manager, S3</title>
      <dc:creator>Sanamdeep Singh</dc:creator>
      <pubDate>Sun, 17 Mar 2019 05:05:04 +0000</pubDate>
      <link>https://dev.to/sanamsoodan/how-to-host-a-static-website-using-amazon-cloudfront-route53-certificate-manager-s3-25j2</link>
      <guid>https://dev.to/sanamsoodan/how-to-host-a-static-website-using-amazon-cloudfront-route53-certificate-manager-s3-25j2</guid>
      <description>

&lt;p&gt;Setting up my own website using AWS I realized how confusing it can be to find all the right information. So I decided to step up and write a blog myself.&lt;/p&gt;

&lt;p&gt;My aim is to run you through some steps so you can have your website up and running in minutes. Here are some steps and checklist to successfully host a website.&lt;/p&gt;

&lt;p&gt;Step 1: Register a Domain&lt;br&gt;
Buy a domain of your choice. eg sanamdeep.dev. You can buy your domain from AWS, Google domains, Go Daddy and other providers. For the scope of this blog we will consider domain to be sanamdeep.dev . You will use the domain you have chosen and replace them with the usage in below steps.&lt;br&gt;
To buy domain name from AWS go to Route53 and check for available domains of your choice.&lt;br&gt;
Step 2: AWS Setup&lt;br&gt;
This Step involves multiple substeps.&lt;/p&gt;

&lt;p&gt;Setting up ACM or AWS Certificate Manager.&lt;br&gt;
ACM handles the complexity of creating and managing public SSL/TLS certificates for your AWS based websites and applications.&lt;br&gt;
Go to AWS Certificate Manager and select “Request a certificate” &amp;gt; “Request a public certificate” &amp;gt; Under domain name enter sanamdeep.dev and &lt;em&gt;.sanamdeep.dev . The second domain name is for all the subdomains like &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt; . &amp;gt; choose “DNS validation” &amp;gt; Review &amp;gt; confirm and request.&lt;br&gt;
After this step if you have bought your domain from AWS then you will have to wait for 10–15 minutes while the certificate is issued. Otherwise if you have bought your domain from a third party domain provider then you will need to click on “ Export DNS configuration to a file” option inside your requested certificate and copy the DNS Name and Values to your domain settings.&lt;br&gt;
Eg for Google Domain you can go to your particular domain and under DNS &amp;gt; Custom resource records you will add the DNS entries. Only enter unique entries.&lt;br&gt;
Only after this step is completed will AWS take 10–15 minutes to issue a certificate.&lt;br&gt;
Set up S3 Buckets&lt;br&gt;
Go to S3 and make 2 buckets &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt; and sanamdeep.dev .&lt;br&gt;
We are creating two buckets so a request from sanamdeep.dev will be redirected to &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt;&lt;br&gt;
Go to bucket sanamdeep.dev and under Permissions &amp;gt; Access public settings edit all the below properties to be false.&lt;br&gt;
Next under Properties &amp;gt; Static website hosting &amp;gt; choose Redirect requests and set target as &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt; and protocol as https.&lt;br&gt;
Now Go to bucket &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt; and under Permissions &amp;gt; Access public settings edit all the below properties to be false.&lt;br&gt;
and put the following policy under Bucket Policy&lt;br&gt;
{&lt;br&gt;
 “Version”: “2012–10–17”,&lt;br&gt;
 “Statement”: [&lt;br&gt;
 {&lt;br&gt;
 “Sid”: “PublicReadForGetBucketObjects”,&lt;br&gt;
 “Effect”: “Allow”,&lt;br&gt;
 “Principal”: “&lt;/em&gt;”,&lt;br&gt;
 “Action”: “s3:GetObject”,&lt;br&gt;
 “Resource”: “arn:aws:s3:::&lt;a href="http://www.sanamdeep.dev/*%E2%80%9D"&gt;www.sanamdeep.dev/*”&lt;/a&gt;&lt;br&gt;
 }&lt;br&gt;
 ]&lt;br&gt;
}&lt;br&gt;
Next under Properties &amp;gt; Static website hosting &amp;gt; Use this bucket to host a website and under index document put index.html. You can now test the endpoint. For the purpose of a sample website use a Hello world HTML file.&lt;br&gt;
While adding files to &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt; make sure to change Manage public permissions to Grant public read access to this object(s).&lt;br&gt;
Setting up CloudFront&lt;br&gt;
Now we will set up two CloudFront one for sanamdeep.dev and the other for &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt;&lt;br&gt;
First lets create CloudFront from &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt;.&lt;br&gt;
Create Distribution &amp;gt; Web &amp;gt; Get Started &amp;gt; Under Origin domain path you need to copy the endpoint for S3 bucket for &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt; . You can go to the S3 bucket and under properties &amp;gt; Static website hosting you can find the endpoint.&lt;br&gt;
Note: do not select the option displayed under Origin domain path.&lt;br&gt;
Upon entering the Origin domain path the Origin ID is automatically populated.&lt;br&gt;
Under Default Cache Behavior Settings &amp;gt; Viewer Protocol Policy choose Redirect Http to Https.&lt;br&gt;
Under Distribution Settings &amp;gt; Alternate Domain Names(CNAMEs) &amp;gt; enter &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt;&lt;br&gt;
Under Distribution Settings &amp;gt; SSL Certificate &amp;gt;choose Custom SSL certificate and choose your certificate&lt;br&gt;
Under Distribution Settings &amp;gt; Default Root Object type index.html&lt;br&gt;
Click Create Distribution. After this CloudFront will take 20–30 minutes to be deployed.&lt;br&gt;
Repeat the process for sanamdeep.dev&lt;br&gt;
Get the endpoint from sanamdeep.dev bucket.&lt;br&gt;
Use sanamdeep.dev as the Alternate Domain Names(CNAMEs)&lt;br&gt;
No need to enter index.html under Distribution Settings &amp;gt; Default Root Object for sanamdeep.dev&lt;br&gt;
Rest of the settings will be similar to the previous CloudFront.&lt;br&gt;
Setting up Route53&lt;br&gt;
In this step Under Hosted Zones &amp;gt; Create Hosted Zones&lt;br&gt;
Enter Domain as sanamdeep.dev and click create.&lt;br&gt;
Now under the newly created hosted zone sanamdeep.dev you will find two automatically created record sets.&lt;br&gt;
One of them will have the Name servers with four entries.&lt;br&gt;
Now Click Create Record Sets &amp;gt;under Name put sanamdeep.dev &amp;gt;&lt;br&gt;
check Alias as yes &amp;gt; choose alias target as the corresponding CloudFront. Make sure to choose the right alias Target.&lt;br&gt;
Create a Record Set for &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt; following the above steps.&lt;br&gt;
Copying the DNS entries&lt;br&gt;
For Third party providers we already copied the DNS entries from certificate manager. But for people using domain from AWS you will need to copy the DNS entries under Route53 if not added automatically.&lt;br&gt;
Copying Name Servers&lt;br&gt;
This step is for domains from third-party providers copy the Name Servers generated in Route53 and add them to the domain. Eg for google domains they can be added under DNS&amp;gt; Name Servers&lt;br&gt;
After this step, you can open your website either by &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt; or sanamdeep.dev. Both will be redirected to &lt;a href="https://www.sanamdeep.dev"&gt;https://www.sanamdeep.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Changes not reflecting on website&lt;br&gt;
Also in case, you make the change to your website by changing contents in S3 bucket. CloudFront can take some time before reflecting the changes automatically. A Faster way is to go to the CloudFront &amp;gt; Invalidations &amp;gt; Create Invalidation and enter /* if you want to invalidate all the files. After creating the invalidation on both &lt;a href="http://www.sanamdeep.dev"&gt;www.sanamdeep.dev&lt;/a&gt; and sanamdeep.dev, the changes will be reflected immediately.&lt;/p&gt;


</description>
      <category>aws</category>
      <category>websitehosting</category>
      <category>cloudfront</category>
      <category>staticwebsitehosting</category>
    </item>
  </channel>
</rss>
