DEV Community

Cover image for Hosting a React App on AWS S3 in 5 minutes.
Eric Rodríguez
Eric Rodríguez

Posted on

Hosting a React App on AWS S3 in 5 minutes.

The simplest web server is no server ☁️
Welcome to Day 15. Today we switch gears from Backend (Python/Lambda) to Frontend.

The Goal

Host a professional React Dashboard without managing servers.

The Steps

Build: Ran npm run build on my Vite project to generate the /dist folder.

Create Bucket: Created a unique S3 bucket in eu-north-1.

Permissions: Unchecked "Block all public access" and added a Bucket Policy allowing s3:GetObject to Principal: "*".

Upload: Uploaded the contents of the /dist folder (index.html + assets) to the root of the bucket.

Enable Hosting: Turned on "Static website hosting" in the Properties tab.

The Outcome

AWS provides a website endpoint immediately. Now my Python backend has a visual frontend to display its data. Next step: Connecting them!

Top comments (0)