How to deploy a React app to AWS Amplify
AWS Amplify provides full-stack deployment for React applications with automatic builds, global CDN, and seamless backend service integration. As the creator of CoreUI with over 12 years of React experience since 2014, I’ve deployed enterprise applications to AWS infrastructure. Amplify offers Git-based continuous deployment with preview environments, custom domains, and integration with AWS services like API Gateway and Lambda. The platform handles build, deployment, and hosting with minimal configuration.
Deploy React apps to AWS Amplify using Git integration or Amplify CLI for full-stack applications.
Method 1: Deploy via Amplify Console
-
Push your React app to GitHub, GitLab, or Bitbucket
-
Visit AWS Amplify Console
-
Click “New app” → “Host web app”
-
Connect your Git repository
-
Configure build settings (auto-detected for Create React App):
version: 1
frontend:
phases:
preBuild:
commands:
- npm install
build:
commands:
- npm run build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- Click “Save and deploy”
Method 2: Deploy via Amplify CLI
# Install Amplify CLI
npm install -g @aws-amplify/cli
# Configure Amplify
amplify configure
# Initialize Amplify in your project
amplify init
# Add hosting
amplify add hosting
# Select "Hosting with Amplify Console"
# Publish
amplify publish
Configure environment variables:
In Amplify Console:
- App settings → Environment variables
- Add variables like
REACT_APP_API_URL
Custom domain setup:
- Domain management → Add domain
- Configure DNS records with your provider
- SSL certificate auto-provisioned
Enable rewrites for client-side routing:
In Amplify Console → Rewrites and redirects:
Source: </^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf)$)([^.]+$)/>
Target: /index.html
Type: 200 (Rewrite)
Best Practice Note
Amplify automatically detects framework and configures builds. Each Git branch gets its own deployment URL. Pull requests get preview environments for testing. Enable performance mode for optimized builds and caching. Use Amplify backend features for authentication, APIs, and databases without separate infrastructure. Monitor builds and deployments in the Amplify Console. This is how we deploy CoreUI enterprise applications—leveraging AWS Amplify for scalable hosting with integrated backend services and automatic CI/CD pipelines.



