AWS Amplify - project setup with Github

Updated: 2023-09-01
1 min read

On This Page

Preface

  • For Amplify project I use eu-west region
  • github repo has to be ready private or public

New project

  1. goto https://eu-west-1.console.aws.amazon.com/amplify/home?region=eu-west-1#/

  2. New app → Host web app → Github

    1. Add access to github repo

      github-setup-access

    2. Select repository

      github-setup-access

  3. Come back to Amplify and try again to choose repo

    github-setup-access

  4. Click Next

Update amplify.yml for node.js project

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - yarn install
    build:
      commands:
        - yarn run build
  artifacts:
    baseDirectory: build
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

amplify-yml

  1. Next → Save and deploy

Amplify starts to build project and generates project url.

amplify-build-process

Once build done you can open project.

amplify-success-url