---
title: Deploy a SPA in AWS with domain or sub-domain - Best Software Development Team Extension Partner for Nordics
description: Deploying Single Page Application (SPA) in Amazon Web Services (AWS) world is not that straight forward like the way SPA sounds. At Craftsmen we have been
image: https://www.craftsmensoftware.com/hubfs/Imported_Blog_Media/Deploy_A_SPA_In_AWS_With_Domain_Or_Sub-Domain.webp
---

[Skip to main content](https://www.craftsmensoftware.com/blog/deploy-a-spa-in-aws-with-domain-or-sub-domain#main-content)

[![Craftsmen-logo](https://www.craftsmensoftware.com/hs-fs/hubfs/Website%202.png?width=200&height=72&name=Website%202.png) ![Craftsmen-logo](https://www.craftsmensoftware.com/hs-fs/hubfs/Website%202.png?width=200&height=72&name=Website%202.png) ![Craftsmen-logo](https://www.craftsmensoftware.com/hs-fs/hubfs/Website%202.png?width=200&height=72&name=Website%202.png) ![Craftsmen-logo](https://www.craftsmensoftware.com/hs-fs/hubfs/Website%202.png?width=200&height=72&name=Website%202.png)](https://www.craftsmensoftware.com)

- [About us](https://www.craftsmensoftware.com/about-us)
- [Client Stories](https://www.craftsmensoftware.com/client-success-stories)
- [How We Work](https://www.craftsmensoftware.com/how-we-work)
- [Case Study](https://www.craftsmensoftware.com/case-study)
- [Blog](https://www.craftsmensoftware.com/blog)
- [Career](https://careers.craftsmensoftware.com/)

Open main navigation

Close main navigation

- [About us](https://www.craftsmensoftware.com/about-us)
- [Client Stories](https://www.craftsmensoftware.com/client-success-stories)
- [How We Work](https://www.craftsmensoftware.com/how-we-work)
- [Case Study](https://www.craftsmensoftware.com/case-study)
- [Blog](https://www.craftsmensoftware.com/blog)
- [Career](https://careers.craftsmensoftware.com/)
- [Get In Touch](https://www.craftsmensoftware.com/contact-us)

[Get In Touch](https://www.craftsmensoftware.com/contact-us)

## Deploy a SPA in AWS with domain or sub-domain

![Deploy a SPA in AWS with domain or sub-domain](https://www.craftsmensoftware.com/hs-fs/hubfs/Imported_Blog_Media/Deploy_A_SPA_In_AWS_With_Domain_Or_Sub-Domain.webp?width=1200&height=820&name=Deploy_A_SPA_In_AWS_With_Domain_Or_Sub-Domain.webp)

Deploying Single Page Application (SPA) in Amazon Web Services (AWS) world is not that straight forward like the way SPA sounds. At [Craftsmen](https://www.craftsmenltd.com/) we have been deploying SPAs in AWS cloud environment pretty frequently for our customers and thought that it’s worth sharing our practices with the world!

Suppose you have a domain called [*www.example.com*](http://www.example.com/) and you want to serve a SPA (built in React, Angular, VueJS etc) web app from AWS cloud environment. Then at a first glance you will face lots of confusing stuffs like S3 bucket, Route53, Cloud Front etc which will need to be configured properly. Lets discuss about them briefly and later we will see necessary configuration steps to make them work together.

**S3 Bucket**: S3 is the simple cloud storage from AWS where you can store any type of file with access permissions. We will put our SPA app in a S3 bucket with public access permission, so that anyone can download files from this bucket.

**CloudFront**: You can think Amazon CloudFront as a CDN. In our case it will cache our static web app from a S3 bucket and will deliver it more efficiently when requested.

**Route 53**: You can consider Route 53 as the domain name resolver similar as NameCheap and other third parties.

## Necessary configurations in S3:

- At first we have to configure a S3 bucket which will act like a web server.
- Login to your AWS web console and select S3 from services. Create two buckets based on your domain and sub-domain name lets call *example.com* and *dev.example.com.* After creating the buckets, upload your SPA app files to the bucket and make all files publicly accessible from Permissions tab or from the “Actions” menu.
- Now from the “Properties” tab of the bucket configuration page click “Static website hosting” tile and give values as shown in the below image. Note the “Endpoint” URL, through which you should be able to access your web site after saving changes.

![Image 1](https://www.craftsmensoftware.com/hs-fs/hubfs/Imported_Blog_Media/1_jm-ehOAmbMAuhkbymIz4Aw.png?width=550&height=614&name=1_jm-ehOAmbMAuhkbymIz4Aw.png)

## Necessary configurations in CloudFront:

 We hosted our app in S3 bucket and now we want to deliver it through CloudFront for better performance and caching.

- Select CloudFront from service in AWS web console.
- Click the “Create Distribution” button and in the Web section click “Get Started” button.
- Paste the “website domain” part of the static assets bucket in Origin domain name . In our case it should be “dev.example.com.s3-website-\[zone\].amazonaws.com”, it will set the Origin ID automatically.
- Select “Redirect HTTP to HTTPS” in “Viewer Protocol Policy” if you want to deliver your site over HTTPS.
- Select “Redirect HTTP to HTTPS” in “Viewer Protocol Policy” if you want to deliver your site over HTTPS.
- In “SSL certificate” section select “Custom SSL Certificate (example.com)” if you already bought a SSL for this domain.
- In “Default root object” type “index.html”.
- Leave the other settings as they are and click the create distribution button.
- It will create a new distribution and will show the list of distributions, with a ID and a CloudFront domain name. At this moment we should be able to browse our site with the new CloudFront domain name when the status is changed to “Deployed”.
- For client side routing you may require to configure redirect rules in case of HTTP 404 error.

## Necessary configurations in Route 53:

If you did not purchase your domain from AWS then following configurations needs to be done in your third party domain controller like NameCheap.

- After the status of new distribution changes to “Deployed”, move on to Route 53 to configure the domain controller to route traffic to the CloudFront if users hit “dev.example.com” or “example.com”.
- Create a new hosted zone for your domain in Route 53.
- Click on “Hosted zones” and then click example.com in the domain list and add a “**A”** record as shown below.

![Image 2](https://www.craftsmensoftware.com/hs-fs/hubfs/Imported_Blog_Media/1_n0T_aLAGKSRvdrgQaXUbAw.png?width=645&height=515&name=1_n0T_aLAGKSRvdrgQaXUbAw.png)

- Normally Route 53 takes up to 60 seconds to start routing to the CloudFront distribution.

If everything goes right then the site should be available in *dev.example.com*.

![Hassanur Rahman](https://www.craftsmensoftware.com/hs-fs/hubfs/Hassanur%20Rahman.png?width=120&height=120&name=Hassanur%20Rahman.png)

Author: **[Hassanur Rahman](https://www.craftsmensoftware.com/blog/author/hassanur-rahman)**  
 15/05/2023

 Head of Engineering

![Hire AI-Native Engineers](https://www.craftsmensoftware.com/hubfs/Z63_3132.webp)

## Hire AI-Native Engineers

[![Book A Strategy Call](https://www.craftsmensoftware.com/hubfs/Book%20A%20Strategy%20Call.svg)](https://www.craftsmensoftware.com/contact-us)

### **About Craftsmen**

[The Team](https://www.craftsmensoftware.com/about-us)

[Our Partnership Model](https://www.craftsmensoftware.com/how-we-work)  
[Career](https://careers.craftsmensoftware.com/)

[FAQ](https://www.craftsmensoftware.com/frequently-asked-questions-faq)  
[Privacy Policy](https://www.craftsmensoftware.com/privacy-policy-best-software-development-company-in-bangladesh) 

[Craftsmen LinkedIn Page](https://linkedin.com/company/craftsmensoftware)   [Craftsmen Facebook Page](https://www.facebook.com/craftsmenltd/)   [Craftsmen Youtube Page](https://www.youtube.com/@craftsmensoftware)

### **Headquarter**

**Craftsmen UK**  
One Sovereign Quay, Bridge End, Leeds, West Yorkshire LS1 4AG United Kingdom 

**Operational Hub

Craftsmen Bangladesh**  
Plot # 316, Lane # 4, DOHS Baridhara,

Dhaka - 1206, Bangladesh

### **Sales & Partnership Offices**

**Craftsmen Norway**  
Kong Oscars gate 66, 68, 5017 Bergen, Norway

**Craftsmen France**  
6 Avenue Pierre Grenier, 92100 Boulogne-Billancourt, Paris, France

### **A Team You Can Trust**

#### [![ISO Certificates New](https://www.craftsmensoftware.com/hs-fs/hubfs/ISO%20Certificates%20New.png?width=300&height=96&name=ISO%20Certificates%20New.png)](https://www.craftsmensoftware.com/trust-centre)

[![glassdoor (1)](https://www.craftsmensoftware.com/hs-fs/hubfs/glassdoor%20(1).png?width=110&height=79&name=glassdoor%20(1).png)](https://www.glassdoor.com/Overview/Working-at-Craftsmen-EI_IE3004266.11,20.htm) [![goodfirms.co](https://www.craftsmensoftware.com/hs-fs/hubfs/goodfirms.co.webp?width=110&height=95&name=goodfirms.co.webp)](https://www.craftsmensoftware.com/blog/craftsmen-thrives-at-goodfirms-by-offering-scalable-robust-software-solutions-developed-with-quality-by-maestros)

 

 © 2026 Craftsmen. All rights reserved.

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Hassanur Rahman",
    "url" : "https://www.craftsmensoftware.com/blog/author/hassanur-rahman"
  },
  "dateModified" : "2026-04-30T08:25:15.239Z",
  "datePublished" : "2023-05-14T18:00:00.000Z",
  "headline" : "Deploy a SPA in AWS with domain or sub-domain - Best Software Development Team Extension Partner for Nordics",
  "image" : [ "https://www.craftsmensoftware.com/hubfs/Imported_Blog_Media/Deploy_A_SPA_In_AWS_With_Domain_Or_Sub-Domain.webp" ],
  "mainEntityOfPage" : {
    "@id" : "https://www.craftsmensoftware.com/blog/deploy-a-spa-in-aws-with-domain-or-sub-domain",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://www.craftsmensoftware.com/hubfs/Craftsmen%20Logo_Black.png"
    },
    "name" : "Craftsmen Ltd."
  }
}
```

```json
{
  "@context" : "https://schema.org",
  "@type" : "SoftwareCompany",
  "address" : [ {
    "@type" : "PostalAddress",
    "addressCountry" : "Norway",
    "addressLocality" : "Oslo"
  }, {
    "@type" : "PostalAddress",
    "addressCountry" : "United Kingdom",
    "addressLocality" : "London"
  }, {
    "@type" : "PostalAddress",
    "addressCountry" : "France",
    "addressLocality" : "Paris"
  }, {
    "@type" : "PostalAddress",
    "addressCountry" : "United States",
    "addressLocality" : "New York"
  }, {
    "@type" : "PostalAddress",
    "addressCountry" : "Bangladesh",
    "addressLocality" : "Dhaka"
  } ],
  "areaServed" : [ {
    "@type" : "Country",
    "name" : "Norway"
  }, {
    "@type" : "Country",
    "name" : "Sweden"
  }, {
    "@type" : "Country",
    "name" : "United Kingdom"
  }, {
    "@type" : "Country",
    "name" : "France"
  }, {
    "@type" : "Country",
    "name" : "United States"
  }, {
    "@type" : "Country",
    "name" : "Bangladesh"
  } ],
  "description" : "Trusted AI-native engineering partner providing software team extension, IT staff augmentation, and dedicated developer teams globally.",
  "logo" : "https://www.craftsmensoftware.com/hubfs/logo.png",
  "name" : "Craftsmen Software",
  "url" : "https://www.craftsmensoftware.com"
}
```