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
-
Install Amplify CLI Amplify CLI
-
Copy .env.local to .env Find
VITE_BACKEND_URL
and add the URL of the API Gateway created with terraform. -
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
.
- Add Auth from AWS User Pools created with terraform
amplify import auth
Select the User Pool only
created with terraform.
YouTube Video
- Add Hosting
amplify add hosting
Select Amazon S3 and Amazon CloudFront
- Publish
amplify publish