<?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: Hoang Nguyen</title>
    <description>The latest articles on DEV Community by Hoang Nguyen (@hoangnphaws).</description>
    <link>https://dev.to/hoangnphaws</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%2F1111517%2F240bd3fd-0ffc-4042-b5f7-61c1bda2627c.jpeg</url>
      <title>DEV Community: Hoang Nguyen</title>
      <link>https://dev.to/hoangnphaws</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hoangnphaws"/>
    <language>en</language>
    <item>
      <title>Declare a Front End App on S3 via CloudFront with high-level design</title>
      <dc:creator>Hoang Nguyen</dc:creator>
      <pubDate>Mon, 03 Jul 2023 07:54:30 +0000</pubDate>
      <link>https://dev.to/hoangnphaws/declare-a-front-end-app-on-s3-via-cloudfront-with-high-level-design-1ab8</link>
      <guid>https://dev.to/hoangnphaws/declare-a-front-end-app-on-s3-via-cloudfront-with-high-level-design-1ab8</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhu14mcwe5i39l07a7bk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhu14mcwe5i39l07a7bk.png" alt="WebApp Deployment Architecture" width="681" height="457"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What?
&lt;/h2&gt;

&lt;p&gt;In this post, we will host a static website on an S3 bucket with Route53, CloudFront and AWS Certificate Manager. The Website need to ensure high security with these Acceptance Criteria:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;S3 bucket must be not public. &lt;/li&gt;
&lt;li&gt;End user can not access the Amazon CloudFront and AWS S3 &lt;/li&gt;
&lt;li&gt;End user can only access the WebApp via the Domain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The CDN which has the permission to view the S3 bucket privately with the help of bucket policy.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why do we have this post?
&lt;/h2&gt;

&lt;p&gt;At the beginning, I want to have a WebApp for my kid that is called &lt;strong&gt;&lt;em&gt;FingerMath&lt;/em&gt;&lt;/strong&gt; App. This will be a simple React App on Front End. You can find out what is the FingerMath methodology at the end of this post.&lt;/p&gt;

&lt;p&gt;Also, I want to have a solution that will be cost effective and scalable with high performance. For this reason, I choose the combination of S3, CloudFront on AWS. With this architecture, end user can access the the WebApp via the CDN which has the permission to view the S3 bucket privately with the help of bucket policy.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why do we need S3 and CloudFront?
&lt;/h2&gt;

&lt;p&gt;In summary, combining AWS S3 and CloudFront provides a scalable, highly available, and cost-effective solution for storing and delivering static websites globally with improved performance and security.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefxwr9cx0bntybr110ee.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefxwr9cx0bntybr110ee.jpg" alt="S3 and CloudFront" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;- Scalability and High Availability:&lt;/em&gt;&lt;/strong&gt; S3 provides highly scalable and durable storage for static website assets, ensuring that the website can handle high traffic and remain available even during peak usage. CloudFront, as a globally distributed CDN, further enhances scalability by caching and delivering content from edge locations close to the user, reducing latency and improving performance.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;- Cost-Effectiveness:&lt;/em&gt;&lt;/strong&gt; S3 and CloudFront offer cost-effective solutions for hosting and delivering static websites. S3 provides affordable storage options, while CloudFront's pay-as-you-go pricing model helps optimize costs by minimizing data transfer and reducing bandwidth costs.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;- Global Content Delivery:&lt;/em&gt;&lt;/strong&gt; CloudFront caches website content in edge locations worldwide, ensuring that users can access the website quickly regardless of their geographical location. This improves the website's performance and user experience by reducing latency and improving load times.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;- Security and Access Control:&lt;/em&gt;&lt;/strong&gt; S3 provides robust security features. CloudFront supports SSL/TLS encryption and provides options for securing content delivery.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;- Easy Management and Deployment:&lt;/em&gt;&lt;/strong&gt; AWS provides user-friendly tools and APIs for managing S3 buckets and CloudFront distributions.&lt;/p&gt;




&lt;h2&gt;
  
  
  How?
&lt;/h2&gt;

&lt;p&gt;Overall, we will complete the task in four steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create and update S3 bucket&lt;/li&gt;
&lt;li&gt;Request certificate with AWS Certificate Manager&lt;/li&gt;
&lt;li&gt;Setup CDN with CloudFront&lt;/li&gt;
&lt;li&gt;Create an alias DNS record on Route53&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Let's begin
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Create and update S3 bucket&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;1.1. Create S3 bucket&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Login into your AWS account, on the top center of the AWS console, jump to the search bar at the top and search for S3&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxqggo8neejq1nr2zprsu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxqggo8neejq1nr2zprsu.png" alt="Create and update S3 bucke" width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inside the S3 dashboard, click on &lt;strong&gt;&lt;em&gt;Create bucket&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;In bucket name, please fill out the bucket name we want to create (e.g. &lt;strong&gt;&lt;em&gt;finger-math-app-bucket-v2&lt;/em&gt;&lt;/strong&gt;). Also, please confirm these options: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ACLs disabled (recommended)&lt;/li&gt;
&lt;li&gt;Block all public access&lt;/li&gt;
&lt;li&gt;All other options just like default&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;1.2. Set up S3 for static website hosting&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
After creating the bucket successfully, open this bucket and switch to Properties Tab and search the &lt;strong&gt;&lt;em&gt;Static website hosting&lt;/em&gt;&lt;/strong&gt; section, click on &lt;strong&gt;&lt;em&gt;Edit&lt;/em&gt;&lt;/strong&gt; button&lt;/p&gt;

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

&lt;p&gt;The default option be &lt;strong&gt;&lt;em&gt;Disable&lt;/em&gt;&lt;/strong&gt;, change it to &lt;strong&gt;&lt;em&gt;Enable&lt;/em&gt;&lt;/strong&gt;. Also, Fill out the index document and Error document with &lt;strong&gt;&lt;em&gt;index.html&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fll957t4mma7r9qif099q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fll957t4mma7r9qif099q.png" alt="Set up S3" width="800" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;1.3. Upload build files to S3 bucket&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Use some tools to upload the build folder such as: AWS Console, AWS CLI, Jenkins, Github Actions, Bitbucket pipelines, …&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvz9lkqvfq9uw5lnithzz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvz9lkqvfq9uw5lnithzz.png" alt="Upload build files to S3 bucket" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Request certificate with AWS Certificate Manager&lt;/strong&gt;&lt;br&gt;
On the top center of the AWS console, jump to the search bar at the top and search for Certificate Manager and click on this service.&lt;br&gt;
When the AWS Certificate Manager is opened,  click on &lt;strong&gt;&lt;em&gt;Request certificate&lt;/em&gt;&lt;/strong&gt; and then choose the Option &lt;strong&gt;&lt;em&gt;Request a public certificate&lt;/em&gt;&lt;/strong&gt; to obtain new SSL certificate.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6rqqven7pokqsa9sn3x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6rqqven7pokqsa9sn3x.png" alt="Request certificate with AWS Certificate Manager" width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the next step, fill out the information as below and then click &lt;strong&gt;&lt;em&gt;Request&lt;/em&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Domain names, e.g fingermath-v2.primax.cloud&lt;/li&gt;
&lt;li&gt;Validation method, e.g. DNS validation - recommended&lt;/li&gt;
&lt;li&gt;Key algorithm, e.g RSA 2048&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;After the certificate is requested successfully, we need to create DNS records in Amazon Route 53 for validation by clicking on the created certificate.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fks59gne0neqeyi6rxgk2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fks59gne0neqeyi6rxgk2.png" alt="Request certificate" width="800" height="132"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On next step, at the section &lt;strong&gt;&lt;em&gt;Domains&lt;/em&gt;&lt;/strong&gt;, click on button &lt;strong&gt;&lt;em&gt;Create Records&lt;/em&gt;&lt;/strong&gt; in Route 53&lt;/p&gt;

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

&lt;p&gt;On next step, click on &lt;strong&gt;&lt;em&gt;Create records&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;After a few minutes, the Status will change from &lt;strong&gt;&lt;em&gt;Pending Validation&lt;/em&gt;&lt;/strong&gt; to &lt;strong&gt;&lt;em&gt;Issued&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;3. Setup CDN with CloudFront&lt;/strong&gt;&lt;br&gt;
On the top center of the AWS console, jump to the search bar at the top and search for CloudFront and click on this service.&lt;br&gt;
When the &lt;strong&gt;&lt;em&gt;CloudFront&lt;/em&gt;&lt;/strong&gt; is opened,  click on &lt;strong&gt;&lt;em&gt;Distributions&lt;/em&gt;&lt;/strong&gt; and then choose &lt;strong&gt;&lt;em&gt;Create distribution&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;On the next step, make sure that: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The S3 bucket that we have created on Step 1.1 as &lt;strong&gt;&lt;em&gt;Origin Domain&lt;/em&gt;&lt;/strong&gt;, e.g. finger-math-app-bucket-v2.s3.ap-southeast-1.amazonaws.com&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Legacy access identities&lt;/em&gt;&lt;/strong&gt; as &lt;strong&gt;&lt;em&gt;Origin access&lt;/em&gt;&lt;/strong&gt;: We need to create the OAI (Origin access identity) for this by clicking on Button &lt;strong&gt;&lt;em&gt;Create new OAI&lt;/em&gt;&lt;/strong&gt;. Choose a specific name, for example: finger-math-app-bucket-v2-OAI and then click &lt;strong&gt;&lt;em&gt;Create&lt;/em&gt;&lt;/strong&gt;. Please note that the bucket policy will need to select Option &lt;strong&gt;&lt;em&gt;Yes, update the bucket policy&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Redirect HTTP to HTTPS as Viewer protocol policy &lt;/li&gt;
&lt;li&gt;GET, HEAD, OPTIONS as Allowed HTTP methods&lt;/li&gt;
&lt;li&gt;Do not enable security protections as &lt;strong&gt;&lt;em&gt;Web Application Firewall (WAF)&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;A domain name created on Step 2.1 as &lt;strong&gt;&lt;em&gt;Alternate domain name (CNAME)&lt;/em&gt;&lt;/strong&gt; (e.g.: fingermath-v2.primax.cloud)&lt;/li&gt;
&lt;li&gt;HTTP/2, HTTP/3 as &lt;strong&gt;&lt;em&gt;Supported HTTP versions&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;The certificate that we have requested on Step 2.1 as &lt;strong&gt;&lt;em&gt;Custom SSL certificate&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;index.html as &lt;strong&gt;&lt;em&gt;Default root object&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;All other options just like default&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After we click on Create distribution, AWS will deploy in several minutes (~ 10 mins). After deploying successfully, the Last modified will change from &lt;strong&gt;&lt;em&gt;Deploying&lt;/em&gt;&lt;/strong&gt; to a &lt;strong&gt;&lt;em&gt;specific datetime&lt;/em&gt;&lt;/strong&gt; (e.g. July 1, 2023 at 9:37:42 AM UTC)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Create an alias DNS record on Route53&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On the top center of the AWS console, jump to the search bar at the top and search for Route53 and click on this service.&lt;br&gt;
When the &lt;strong&gt;&lt;em&gt;Route53&lt;/em&gt;&lt;/strong&gt; is opened,  click on your Hosted zone (e.g. primax.cloud) and then click on your Domain name&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ebbnt14uh7pgd2qhc3f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ebbnt14uh7pgd2qhc3f.png" alt="Create an alias DNS record on Route53" width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the next Step, you will see a list of records of your Domain Name. Click on &lt;strong&gt;&lt;em&gt;Create record&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femhitpi9il4le08sb00y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femhitpi9il4le08sb00y.png" alt="Create records on Route53" width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the next Step, make sure to choose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your preferred subdomain as &lt;strong&gt;&lt;em&gt;Record name&lt;/em&gt;&lt;/strong&gt; (e.g. fingermath-v2)&lt;/li&gt;
&lt;li&gt;Turn on the &lt;strong&gt;&lt;em&gt;Alias&lt;/em&gt;&lt;/strong&gt; radio button&lt;/li&gt;
&lt;li&gt;Alias to CloudFront Distribution as &lt;strong&gt;&lt;em&gt;Route traffic&lt;/em&gt;&lt;/strong&gt; to&lt;/li&gt;
&lt;li&gt;Choose the Cloud Front that you have created on Step 3￼&lt;/li&gt;
&lt;li&gt;All other options just like default&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6rfxna4pz2x7jea1xsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6rfxna4pz2x7jea1xsk.png" alt="Create an alias DNS record on Route53" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And voila, your website is going online in few minutes (~5 mins)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thank you for reading the post.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;P/S: I have created a React App that will teach the Kids how to calculate with Finger Math methodology on this website &lt;a href="https://fingermath.primax.cloud/"&gt;https://fingermath.primax.cloud/&lt;/a&gt;. So, please be free to use this.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Finger Math is a mathematical technique that uses fingers as a visual aid for performing calculations. It is commonly used as a tool to teach basic arithmetic concepts, particularly addition and subtraction, to young children.&lt;/p&gt;

&lt;p&gt;Finger Math helps children develop number sense, improve their counting skills, and gain a conceptual understanding of basic arithmetic operations. It engages their tactile and visual senses, making math more tangible and accessible. It is often used as a foundational learning tool before children progress to mental math strategies.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi3a0urbjx89c8aesgrv2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi3a0urbjx89c8aesgrv2.jpg" alt="FingerMath methodology" width="700" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you found the topic helpful, you can buy me a coffee with this &lt;a href="https://www.buymeacoffee.com/hoangnph"&gt;link&lt;/a&gt;. Thank you so much. &lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>react</category>
      <category>webapp</category>
    </item>
  </channel>
</rss>
