Repository and React app setup
- Create repo in CodeCommit
- Clone repo:
git clone codecommit::us-east-1://my-react-app
cd my-react-app
- Create react app with vite:
npm create vite@latest .
Select framework: React, variant: TypeScript
Install packages
npm run install
- Commit and push app creation with vite to main branch
git add .; git commit -m "App creation with vite"
git push
Create AWS Amplify App
- Select CodeCommit, next
- Add repository and branch, next
- Review app settings: App name, Build settings (use "npm run build" for Frontend build command and "dist" for Build output directory), next
- Save and deploy
- When app fails due to repository access:
CustomerError: Unable to clone repository due to user error code: 128
5.1. Create a service role:
https://docs.aws.amazon.com/amplify/latest/userguide/how-to-service-role-amplify-console.html
5.2. After service role creation, add it to Amplify settings:
Go to App settings > General settings > Edit > Select a "Service role" and save
Go to failed deployment and select "Redeploy this version"
Top comments (0)