Skip to content

Latest commit

 

History

History
75 lines (41 loc) · 3.9 KB

deploy.md

File metadata and controls

75 lines (41 loc) · 3.9 KB

Semi-Automatic Deployment

This deployment method uses the AWS Amplify console to deploy the web app via AWS CodeCommit.

For a more automated deployment, see the relevant section in the readme.

Steps

Populate AWS CodeCommit

For other ways of commiting code to AWS CodeCommit, refer to the Setting up section in the reference guide.

  • Download the repository as a .zip file.

    • In GitHub, select Code, then Download ZIP.
    • In GitLab, select the download icon, then zip.
    • Make a note of the file name (it should be aws-healthscribe-demo-main.zip).
  • Navigate to the AWS console for AWS CodeCommit.

  • Select Create repository.

  • Name the repository aws-healthscribe-demo, and select Create.

  • At the top of the AWS console, select the AWS CloudShell icon. This is to the right of the search bar, and left of the notifications icon.

  • After CloudShell has loaded, configure git with your email, name, and changing the default branch name to main.

git config --global user.email "<email>"
git config --global user.name "<name>"
git config --global init.defaultBranch main
  • In the Actions dropdown, then Upload file. Select the zip file you downloaded in step 1.

  • Unzip the file to the repository: unzip <filename>. E.g. unzip aws-healthscribe-demo-main.zip. This extracts the repository into a directory called aws-healthscribe-demo-main.

  • Within the repository directory, initialize git: cd aws-healthscribe-demo-main; git init

  • In the AWS console for CodeCommit, select Clone URL, then Clone HTTPS (GRC). This copies a CodeCommit URL similiar to codecommit::us-east-1://aws-healthscribe-demo to your cliipboard.

  • Add the CodeCommit repository: git remote add origin <clone URL>, i.e. git remote add origin codecommit::us-east-1://aws-healthscribe-demo.

  • Push the files to CodeCommit: git add -A; git commit -m "Initial commit"; git push -u origin main

  • Close AWS CloudShell.

Deploy using AWS Amplify

  • Navigate to the AWS console for AWS Amplify.

  • Select New app, then Host web app.

  • In the Get started with Amplify Hosting page, select AWS CodeCommit, then select Continue.

  • Select the AWS CodeCommit repository you created earlier (aws-healthscribe-demo), and verify that the branch name is correct (main). Select Next.

  • Feel free to change the app name on the Build settings screen.

  • In the Environment dropdown, select Create new environment.

  • In the Service Role dropdown, select an existing role if have an existing service role for Amplify. Otherwise select the Create new role button and follow the prompts. After creating the new IAM role, select the refresh button next to the dropdown and select your newly created IAM role.

  • Verify amplify.yml is detected in the Build and test settings section.

  • Review the app settings, and select Save and deploy

  • If a build fails, you can review the logs from the AWS Amplify console. You can also attempt a rebuild by selecting the failed build, then selecting the Redeploy this version button.

Note: if the error says Amplify app ID not found, modify the build service IAM role to include the AdministratorAccess-Amplify AWS-managed policy. You can find the build service IAM role by selecting General in the Amplify app console.

  • The web app URL is named https://<backend env name>.<app id>.amplifyapp.com and can be found in the Hosting environments tab