This tutorial guides you through deploying a frontend application from a GitHub repository to AWS Amplify
Prerequisites:
An AWS account with appropriate permissions.
An existing GitHub repository with a branch named
<environment>
Steps:
In the Amplify console, create a new app → Host web app
Select Github.
Select your repository from the list.
Choose the specific branch you want to deploy from
Configure Build Settings:
App name
lend2b-<environment>In Build and test settings click in edit button.
Edit the command section and add
npm run buildEdit the baseDirectory and add
distSave and Deploy
In the "Environment variables" section, click in Manage Variables and add the following:
VITE_API_URL: URL of your backend APIhttps://<environment>-api.lend2b.com
VITE_APPSYNC_API_KEY: Your Appsync API KeyVITE_POOL_ID: Your Cognito User Pool IDVITE_CLIENT_ID: Your Cognito Client IDVITE_ENVIRONMENT: Indicate the environmentVITE_GRAPHQL_URL: URL of your GraphQL endpoint
Deploy your Application