AWS Builder Center
Building and Deploying a JAMstack Website with React, Contentful, Amazon S3, and AWS Amplify

Building and Deploying a JAMstack Website with React, Contentful, Amazon S3, and AWS Amplify

Learn how to build and deploy a modern JAMstack website using React, Contentful, Amazon S3, GitHub, and AWS Amplify. This project demonstrates how to separate content management from the frontend while automating deployments through a CI/CD pipeline.

Introduction

Modern websites are no longer limited to static HTML files or tightly coupled backend applications. Instead, many organizations adopt the JAMstack architecture, where the frontend, content management system, media storage, and deployment pipeline are completely decoupled.
In this project, I built a travel journal website using React and Vite as the frontend framework, Contentful as a headless CMS, Amazon S3 for storing media assets, and AWS Amplify Hosting for deployment. The result is a production-ready application where content can be updated independently of the frontend while every GitHub commit automatically triggers a new deployment.
This architecture improves scalability, simplifies content management, and enables developers to focus on building the user experience without maintaining a traditional backend.

Architecture

Content Editor
      │
      ▼
Contentful CMS
      │
      ▼
Content Delivery API
      │
      ▼
React + Vite Application
      │
      ▼
Amazon S3 (Images)
      │
      ▼
AWS Amplify Hosting
      │
      ▼
HTTPS Website

Technologies Used

  • AWS Amplify Hosting
  • Amazon S3
  • React
  • Vite
  • Contentful
  • Git
  • GitHub
  • JavaScript
  • HTML5
  • CSS3
  • REST APIs

Project Goals

The primary objective of this project was to explore how a modern cloud-native website can be built using loosely coupled services instead of a traditional monolithic architecture.
The application was designed with the following goals:
  • Dynamic content management through a headless CMS
  • External media storage using Amazon S3
  • Responsive React frontend
  • Automated GitHub-based deployments
  • Secure HTTPS hosting using AWS Amplify
  • Easy scalability and maintainability

Building the Application

The frontend was developed using React and Vite, providing a lightweight and responsive user experience. Rather than storing travel stories directly inside the application, all content was managed within Contentful and retrieved dynamically through its Content Delivery API.
Images associated with each destination were stored separately in Amazon S3. This separation between structured content and media assets reflects a common architecture used in production environments, where object storage services handle static files while a CMS manages editorial content.
The application included destination cards, travel summaries, responsive layouts, and reusable React components, making it straightforward to extend with additional destinations or categories.

Managing Content with Contentful

One of the biggest advantages of using a headless CMS is the ability to update website content without modifying the frontend code.
Travel stories—including titles, locations, descriptions, and image references—were managed entirely through Contentful. Once new content was published, the React application automatically retrieved the latest entries through the Content Delivery API.
This separation allows developers and content creators to work independently while reducing deployment overhead for simple content updates.

Storing Media in Amazon S3

Instead of bundling images within the React application, all travel images were stored in Amazon S3.
Using Amazon S3 offers several benefits:
  • Highly durable object storage
  • Independent scaling for media assets
  • Reduced frontend bundle size
  • Easy replacement of images without rebuilding the application
The React application simply references the image URLs, allowing browsers to fetch media directly from Amazon S3.

Deploying with AWS Amplify

After pushing the project to GitHub, AWS Amplify Hosting was connected directly to the repository.
Amplify automatically detected the React application, configured the build process, generated a secure HTTPS endpoint, and deployed the production build without requiring any manual infrastructure management.
Because the project was stored inside a monorepo, configuring the application root correctly was an important part of the deployment process. Once configured, subsequent deployments became completely automated.

Automatic CI/CD

One of the most valuable outcomes of this project was implementing an automated deployment workflow.
The deployment pipeline follows this flow:
Code Changes
      │
      ▼
Git Commit
      │
      ▼
GitHub Push
      │
      ▼
AWS Amplify detects commit
      │
      ▼
Build React Application
      │
      ▼
Deploy Updated Website
      │
      ▼
Production Environment
Every commit pushed to the GitHub repository automatically triggered a new build and deployment. This eliminated the need for manual uploads while ensuring that the production website remained synchronized with the latest source code.

Benefits of the JAMstack Architecture

Separating the frontend, CMS, object storage, and deployment pipeline provides several advantages over traditional web architectures.
Some of the key benefits include:
  • Independent content management
  • Faster frontend performance
  • Reduced operational complexity
  • Simplified deployments
  • Better scalability
  • Improved developer experience
  • Secure HTTPS hosting
  • Automated CI/CD workflows
This architectural pattern is commonly used for marketing websites, documentation portals, blogs, and portfolio applications.

Challenges

This project introduced several practical challenges that are common when deploying modern frontend applications.
Some of the key learning experiences included:
  • Understanding how headless CMS platforms differ from traditional content management systems.
  • Configuring Amazon S3 to securely serve media assets.
  • Connecting React applications with external APIs.
  • Configuring AWS Amplify for monorepo deployments.
  • Managing environment variables securely during production deployments.
  • Validating automatic deployments through GitHub integration.
Each challenge helped reinforce how multiple AWS services work together to deliver scalable frontend applications.

Key Takeaways

This project provided hands-on experience with several modern web development concepts.
The biggest takeaways included:
  • Building React applications with dynamic content.
  • Integrating a headless CMS into a frontend application.
  • Using Amazon S3 for scalable object storage.
  • Deploying applications with AWS Amplify Hosting.
  • Automating deployments through GitHub-based CI/CD.
  • Designing applications using JAMstack principles.

Conclusion

This project demonstrates how AWS services can simplify the deployment of modern JAMstack applications while allowing frontend code, content management, and media storage to evolve independently.
By combining React, Contentful, Amazon S3, GitHub, and AWS Amplify, I built a scalable website that supports dynamic content, automated deployments, and cloud-native architecture without managing traditional backend infrastructure.
For developers exploring modern frontend development on AWS, this project offers a practical introduction to building and deploying production-ready JAMstack applications.

GitHub

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article