AWS Builder Center
Deploying a Vite + React App from a GitHub Monorepo with AWS Amplify Hosting

Deploying a Vite + React App from a GitHub Monorepo with AWS Amplify Hosting

Learn how I deployed the frontend of my InfraShift project from a GitHub monorepo using AWS Amplify Hosting, configured the monorepo app root, build specification, artifacts, and SPA routing, and resolved a CloudFront HTTP 404 deployment issue.

Deploying a Vite + React App from a GitHub Monorepo with AWS Amplify Hosting

Building a project as a monorepo is convenient because the frontend, backend, AI services, infrastructure code, and supporting tools can live in a single GitHub repository.
However, deploying only the frontend from that repository introduces an important configuration problem: AWS Amplify needs to know which directory is the actual application.
That was exactly the challenge I faced while deploying my project, InfraShift, with AWS Amplify Hosting.

The project structure

My GitHub repository contains multiple parts of the project:
InfraShift/
├── ai_engine/
├── aws/
├── backend/
├── demo_workload/
├── frontend/
├── README.md
├── generate_data.py
└── verify_aws_workload.py
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