Running this App in AWS Amplify

Prerequisites

Install the infrastructure using terraform. The terraform script will create the AWS User Pools and Identity Pools required for the app to run. Github Repository

  1. Install Amplify CLI Amplify CLI

  2. Copy .env.local to .env Find VITE_BACKEND_URL and add the URL of the API Gateway created with terraform.

  3. Initialize Amplify

amplify init

Mind that the Amplify default project build folder in vite should be dist. Youtube Video Instead of accepting the default configuration, choose n and set the build folder to dist.

  1. Add Auth from AWS User Pools created with terraform
amplify import auth

Select the User Pool only created with terraform. YouTube Video

  1. Add Hosting
amplify add hosting

Select Amazon S3 and Amazon CloudFront

  1. Publish
amplify publish