AWS CodeCommit to AWS Amplify Web App

AWS CodeCommit → AWS Amplify

Create a CodeCommit repository and deploy an Amplify web application from a local folder.

This sample pattern demonstrates how to deploy an AWS Amplify web application from a local folder or repository using an AWS CodeCommit repository. This pattern is useful for quickly deploying and hosting a web application on AWS from your local machine.
This pattern first creates a CodeCommit repository from the web application code in the local folder 'local-webapp-code'. Then it creates an Amplify app using the CodeCommit repository as the source repository. Finally, it creates a custom resource that creates an Amplify job to build and deploy the Amplify app.
Without this custom resource, your Amplify app will not build or deploy. If your web application communicates with a backend, the pattern demonstrates how to pass an API endpoint from the CDK to the Amplify app as an environment variable.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/amplify-codecommit

Deploy

cdk deploy


Testing

See the Github repo for detailed testing instructions.

Cleanup

Delete the stack: cdk destroy

Created by:

Maya Flores

Maya Flores

Partner Solutions Architect @ AWS. Serverless enthusiast.

Follow on LinkedIn