<?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: Juhi Srivastava</title>
    <description>The latest articles on DEV Community by Juhi Srivastava (@juhisri02).</description>
    <link>https://dev.to/juhisri02</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3428111%2F5136f4ee-a253-4760-a8b7-548a7d54e3a9.png</url>
      <title>DEV Community: Juhi Srivastava</title>
      <link>https://dev.to/juhisri02</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/juhisri02"/>
    <language>en</language>
    <item>
      <title>Deploy Your Angular App with AWS S3 &amp; CloudFront: A Fast, Cost-Effective Guide</title>
      <dc:creator>Juhi Srivastava</dc:creator>
      <pubDate>Mon, 17 Aug 2026 20:42:47 +0000</pubDate>
      <link>https://dev.to/juhisri02/deploy-your-angular-app-with-aws-s3-cloudfront-a-fast-cost-effective-guide-35if</link>
      <guid>https://dev.to/juhisri02/deploy-your-angular-app-with-aws-s3-cloudfront-a-fast-cost-effective-guide-35if</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Deploying your Angular application to the cloud is a crucial step in sharing your work with the world. AWS offers a reliable and scalable way to host your app with minimal cost and effort — especially using S3 for static hosting combined with CloudFront for fast global delivery. In this guide, I’ll walk you through how to deploy your Angular app on AWS quickly, even if you’re new to AWS.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we start, make sure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An Angular app ready to deploy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An AWS account (free tier is sufficient for basic hosting)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Basic knowledge of Angular CLI and AWS Console&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Before we start …
&lt;/h2&gt;

&lt;p&gt;Before we dive into the step-by-step process to deploy an Angular app on AWS, it’s important to understand the core services we’ll be using: &lt;strong&gt;Amazon S3&lt;/strong&gt; and &lt;strong&gt;CloudFront&lt;/strong&gt;, and how they work together to host a static website efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Amazon S3?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Simple Storage Service (Amazon S3)&lt;/strong&gt; is a highly scalable, secure, and durable object storage service. It allows you to store and protect any amount of data, supporting a wide range of use cases such as data lakes, mobile apps, backups, archives, enterprise applications, IoT devices, big data analytics, and — importantly for us — static website hosting.&lt;/p&gt;

&lt;p&gt;In simple terms, S3 acts as a reliable place to store your website files — HTML, CSS, JavaScript, images, and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html" rel="noopener noreferrer"&gt;Learn more about Amazon S3&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  What is CloudFront?
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Amazon CloudFront&lt;/strong&gt; is a fast, secure, and programmable Content Delivery Network (CDN) service. It delivers your web content — including static and dynamic files, videos, APIs — globally with low latency and high transfer speeds.&lt;/p&gt;

&lt;p&gt;CloudFront caches your content at edge locations worldwide, so your users get faster access regardless of their geographical location. It acts as a distributed cache, retrieving content from your origin (like your S3 bucket) and serving it quickly from the nearest edge location.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html" rel="noopener noreferrer"&gt;Learn more about Amazon CloudFront&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Our Plan for Static Website Hosting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;S3&lt;/strong&gt; will store and deliver the static files of our Angular application (UI content).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will deploy the Angular build output directly into an S3 bucket configured for static website hosting.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To improve performance and reduce latency, &lt;strong&gt;CloudFront&lt;/strong&gt; will be used to distribute our content globally.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Accessing the website directly from the S3 bucket is possible but can lead to higher latency, especially for users far from the AWS region hosting your bucket.&lt;/p&gt;

&lt;p&gt;CloudFront speeds up this delivery by caching content in multiple edge locations across the Americas, Europe, Asia, Africa, and more. When a user requests your website, CloudFront first checks its nearest cache (edge location). If the content is not found there, it fetches it from the S3 bucket and caches it for subsequent requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lets begin..
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Build Your Angular Application
&lt;/h3&gt;

&lt;p&gt;Open your terminal and navigate to your Angular project folder. Run the following command to build your app for production:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng build &lt;span class="nt"&gt;--prod&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command compiles your app into static files optimized for performance. The output will be in the &lt;code&gt;dist/your-app-name&lt;/code&gt; folder.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Create an S3 Bucket
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Log in to the AWS Management Console.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to &lt;strong&gt;S3&lt;/strong&gt; and click &lt;strong&gt;Create bucket&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose a unique bucket name (e.g., &lt;code&gt;my-angular-app-bucket&lt;/code&gt;) and your preferred AWS region.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Leave the default settings, but &lt;strong&gt;uncheck “Block all public access”&lt;/strong&gt; so your site can be publicly accessible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirm the warning and create the bucket.&lt;/p&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%2Flgmh34er4eo52de7dgm1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flgmh34er4eo52de7dgm1.png" alt=" " width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click on your newly created bucket.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on “Properties” Tab and then edit the “&lt;strong&gt;Static website hosting&lt;/strong&gt;”&lt;/p&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%2Flgj9obgrwdbe2dds6vz6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flgj9obgrwdbe2dds6vz6.png" alt=" " width="586" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Enable Static Website Hosting
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click on your bucket name, then go to the &lt;strong&gt;Properties&lt;/strong&gt; tab.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scroll down to &lt;strong&gt;Static website hosting&lt;/strong&gt; and click &lt;strong&gt;Edit&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;strong&gt;Enable&lt;/strong&gt;, choose &lt;strong&gt;Use this bucket to host a website&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter &lt;code&gt;index.html&lt;/code&gt; as the &lt;strong&gt;Index document&lt;/strong&gt; and &lt;code&gt;404.html&lt;/code&gt; as the &lt;strong&gt;Error document&lt;/strong&gt; (create a 404 page or leave empty).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Save changes.&lt;/p&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%2F0lrxmxc7rfc9fcrabi98.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0lrxmxc7rfc9fcrabi98.png" alt=" " width="800" height="381"&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%2Ftzutck7dcmenq62bf7ty.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftzutck7dcmenq62bf7ty.png" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Upload Your Angular Build Files
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open the &lt;code&gt;dist/your-app-name&lt;/code&gt; folder on your computer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the AWS Console, go to your S3 bucket and click &lt;strong&gt;Upload&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Upload all the files and folders from the &lt;code&gt;dist&lt;/code&gt; directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Alternatively, use below commands:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;cp&lt;/span&gt; ./dist s3://YOUR-BUCKET-NAME –recursive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;Go to “Permissions” and navigate to the Public Access settings for your bucket. Unselect “&lt;em&gt;Block public and cross-account access if bucket has public policies&lt;/em&gt;” . We have to change it to false, otherwise it will block public access and our app will be inaccessible from internet. By default all AWS S3 buckets are private.&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%2Fsrcd5t0nzktjdfsrw7lq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsrcd5t0nzktjdfsrw7lq.png" alt=" " width="586" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Set Bucket Policy for Public Access
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In the “Permissions” Tab , add the bucket policy to “&lt;em&gt;GetObject&lt;/em&gt;” that will allow public to access our data. Apply the policy that will allow public access to data in AWS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Save the policy.&lt;/p&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%2Fp2m2jg4rxv6xdh8p73bn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp2m2jg4rxv6xdh8p73bn.png" alt=" " width="800" height="345"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Sid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"PublicReadGetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Principal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:s3:::YOUR_BUCKET_NAME/*"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 6: Use CloudFront for CDN and HTTPS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Navigate to AWS CloudFront Console&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Visit &lt;a href="https://console.aws.amazon.com/cloudfront/" rel="noopener noreferrer"&gt;https://console.aws.amazon.com/cloudfront/&lt;/a&gt; and click &lt;strong&gt;Create Distribution&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Choose Delivery Method&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Select &lt;strong&gt;Web&lt;/strong&gt; as the delivery method and click &lt;strong&gt;Get Started&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure Origin Settings&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For &lt;strong&gt;Origin Domain Name&lt;/strong&gt;, select or enter your S3 bucket URL.&lt;/li&gt;
&lt;li&gt;Make sure to choose the correct bucket that hosts your static website content.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set Viewer Protocol Policy&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Under &lt;strong&gt;Default Cache Behavior Settings&lt;/strong&gt;, change the &lt;strong&gt;Viewer Protocol Policy&lt;/strong&gt; to &lt;strong&gt;Redirect HTTP to HTTPS&lt;/strong&gt; to enforce secure connections.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure Distribution Settings&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;Distribution Settings&lt;/strong&gt; section, add your &lt;strong&gt;Alternative Domain Name (CNAME)&lt;/strong&gt; if you want to use a custom domain (e.g., &lt;a href="http://www.yourdomain.com" rel="noopener noreferrer"&gt;www.yourdomain.com&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Select an appropriate &lt;strong&gt;SSL Certificate&lt;/strong&gt; (either an AWS Certificate Manager certificate for your domain or use the default CloudFront certificate) to enable HTTPS.&lt;/li&gt;
&lt;li&gt;If you don't need a custom domain, leave the SSL settings as default.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review and Create&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Keep other settings at their default values unless you have specific requirements.&lt;br&gt;&lt;br&gt;
Scroll down and click &lt;strong&gt;Create Distribution&lt;/strong&gt; to finalize.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wait for Distribution Deployment&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
CloudFront will take approximately &lt;strong&gt;10–15 minutes&lt;/strong&gt; to deploy your distribution. You’ll be notified when it’s ready.&lt;/p&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%2Ftnzwa2zcoz1pmsc6xow6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftnzwa2zcoz1pmsc6xow6.png" alt=" " width="799" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to Distributions to see the newly created distribution. The domain name column contains your CloudFront URL, which will be something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://YOUR-BUCKET-NAME.s3-website-YOUR-BUCKET-ZONE.amazonaws.com" rel="noopener noreferrer"&gt;&lt;em&gt;YOUR-BUCKET-NAME.s3-website-YOUR-BUCKET-ZONE.amazonaws.com&lt;/em&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%2Fj0wgzcftilecvuw53ql1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj0wgzcftilecvuw53ql1.png" alt=" " width="586" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the CloudFront URL and paste it into the browser tab. You should successfully see your application.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Things to Keep in Mind When Configuring an S3 Bucket as a Static Website
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Eable Static Website Hosting:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To serve your content as a static website, you need to enable static website hosting on your S3 bucket. This setting allows Amazon S3 to function like a web server.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Configure and Upload an Index Document:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;An &lt;strong&gt;index document&lt;/strong&gt; is the default webpage that Amazon S3 returns when visitors access the root of your website or any subfolder. Make sure to create and upload this file (usually &lt;code&gt;index.html&lt;/code&gt;) to your bucket.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Set Permissions for Public Access (if required):&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you want your website to be publicly accessible, you need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1. &lt;strong&gt;Disable the “Block Public Access” settings&lt;/strong&gt; on your bucket.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2. &lt;strong&gt;Add a bucket policy&lt;/strong&gt; that grants public read permissions, allowing anyone to view your website content.&lt;br&gt;&lt;br&gt;
    Without these permissions, users won’t be able to access your website.&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;strong&gt;Understand Your Website Endpoint URL&lt;/strong&gt;&lt;br&gt;
&lt;/h3&gt;

&lt;p&gt;When static website hosting is enabled, your website is accessible via an AWS Region-specific endpoint.&lt;br&gt;&lt;br&gt;
The URL format depends on your region and typically looks like one of the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://bucket-name.s3-website-&lt;region&gt;.amazonaws.com" rel="noopener noreferrer"&gt;&lt;em&gt;http://bucket-name.s3-website-&amp;lt;region&amp;gt;.amazonaws.com&lt;/em&gt;&lt;/a&gt; &lt;em&gt;(with a dash -)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://bucket-name.s3-website.&lt;region&gt;.amazonaws.com" rel="noopener noreferrer"&gt;&lt;em&gt;http://bucket-name.s3-website.&amp;lt;region&amp;gt;.amazonaws.com&lt;/em&gt;&lt;/a&gt; &lt;em&gt;(with a dot .)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Refer to AWS Documentation for More Details:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For comprehensive guidance on static website hosting with Amazon S3, visit the official AWS docs:  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteHosting.html?source=post_page-----4578752270c3---------------------------------------" rel="noopener noreferrer"&gt;Hosting a static website using Amazon S3&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>aws</category>
      <category>website</category>
    </item>
  </channel>
</rss>
