Deploy a Web App on AWS Amplify
tutorial
Task 4: Deploy the App
In this task, you will deploy your web application using Amplify’s built-in CI/CD pipeline.
Introduction
In this task, you will store your application on a GitHub repository, and then set up continuous deployment using the Amplify Console.
What you will accomplish
- Connect a Github repository to Amplify
- Set up continuous deployment using Amplify
Implementation
Time to Complete
< 2 minutes
Get help
-
Step 1: Initialize GitHub repository
In this step, you will create a GitHub repository and commit your code to the repository. You will need a GitHub account to complete this step. If you do not have an account, sign up here.
Note: If you have never used GitHub on your computer, follow these steps before continuing to allow connection to your account.
1. Sign in to GitHub at https://github.com/.
2. In the Start a new repository section, make the following selections:
- For Repository name, enter expensetracker, and choose the Public radio button.
- Then select, Create a new repository.
3. Open a new terminal window, navigate to your projects root folder (expensetracker) , and run the following commands to initialize a git and push of the application to the new GitHub repo:
Notes:
- Replace the SSH GitHub URL in the command with your GitHub URL.
git init git add . git commit -m "first commit" git remote add origin [email protected]:<your-username>/profilesapp.git git branch -M main git push -u origin main
-
Step 2: Create your app with AWS Amplify
In this step, you will connect the GitHub repository you just created to the AWS Amplify. This will allow you to build, deploy, and host your app on AWS.
1. Sign in to the AWS Management Console in a new browser window, and open the AWS Amplify console at https://console.aws.amazon.com/amplify/apps.
2. Choose Create new app.
3. On the Start building with Amplify page, for Deploy your app, select GitHub, and select Next.
4. When prompted, authenticate with GitHub. You will be automatically redirected back to the Amplify console. Choose the repository and main branch that you created earlier. Then, select Next.
5. Leave the default build setting, and select Next.
6. Review the inputs selected and choose Save and deploy.
AWS Amplify will now build your source code and deploy your app at https://...amplifyapp.com, and on every git push your deployment instance will update. It may take up to 5 minutes to deploy your app.
7. Once the build completes, select the Visit deployed URL button to see your web app up and running live.