Trang chủMặc địnhContinuously deploy a modern AWS Amplify web application from an AWS CodeCommit repository

Continuously deploy a modern AWS Amplify web application from an AWS CodeCommit repository

Trung Đoàn
1:09 AM 07/20/2023

Modern web applications are constructed as single-page applications (SPAs) that package all application components into static files. By using AWS Amplify Hosting, you can build a continuous integration and continuous deployment (CI/CD) pipeline that builds, deploys, and hosts a modern web application that is managed in a Git-based repository. When you connect Amplify Hosting to the code repository, each commit initiates a single workflow to deploy the application frontend and backend. The benefit of this approach is that the web application is updated only after the deployment is successfully completed, which prevents inconsistencies between the frontend and backend.

In this pattern, you use an AWS CodeCommit repository to manage your modern web application. The sample web application in these instructions uses the React SPA framework. However, Amplify Hosting supports many other SPA frameworks, such as Angular, Vue, Next.js, and it also support single-site generators, such as Gatsby, Hugo, and Jekyll.

Intended audience

This pattern is intended for AWS builders who have experience with the following services and concepts:

  • AWS CodeCommit

  • AWS Amplify Hosting

  • React

  • JavaScript

  • Node.js

  • npm

  • Git

Architecture

Target technology stack

  • AWS CodeCommit repository containing a React SPA

  • AWS Amplify Hosting workflow

Target architecture

 

Architecture diagram of deploying a web app from a CodeCommit repo and hosting with AWS Amplify

Tools

AWS services

  • AWS Amplify Hosting provides a Git-based workflow for hosting full-stack serverless web applications with continuous deployment.

  • AWS CodeCommit is a version control service that helps you privately store and manage Git repositories, without needing to manage your own source control system.

  • AWS Identity and Access Management (IAM) helps you securely manage access to your AWS resources by controlling who is authenticated and authorized to use them.

Other tools

  • Node.js is an event-driven JavaScript runtime environment designed for building scalable network applications.

  • npm is a software registry that runs in a Node.js environment and is used to share or borrow packages and manage deployment of private packages.

Epics

 

Create a CodeCommit repository

Task Description Skills required

Create a repository.

For instructions, see Create an AWS CodeCommit repository in the CodeCommit documentation.

AWS DevOps

Clone the repository.

For instructions, see Connect to the CodeCommit repository by cloning the repository in the CodeCommit documentation. If you are prompted, provide the Git credentials.

Bình luận