Integrate a Bitbucket repository with AWS Amplify using AWS CloudFormation
Created by Alwin Abraham (AWS)
Environment: Production | Technologies: DevOps | AWS services: AWS Amplify; AWS CloudFormation |
Summary
AWS Amplify helps you to quickly deploy and test static websites without having to set up the infrastructure that is typically required. You can deploy this pattern's approach if your organization wants to use Bitbucket for source control, whether to migrate existing application code or build a new application. By using AWS CloudFormation to automatically set up Amplify, you provide visibility into the configurations that you use.
This pattern describes how to create a front-end continuous integration and continuous deployment (CI/CD) pipeline and deployment environment by using AWS CloudFormation to integrate a Bitbucket repository with AWS Amplify. The pattern's approach means that you can build an Amplify front-end pipeline for repeatable deployments.
Prerequisites and limitations
Prerequisites
Architecture
Technology stack
Amplify
AWS CloudFormation
Bitbucket
Tools
AWS Amplify – Amplify helps developers to develop and deploy cloud-powered mobile and web apps.
AWS CloudFormation – AWS CloudFormation is a service that helps you model and set up your AWS resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS.
Bitbucket
– Bitbucket is a Git repository management solution designed for professional teams. It gives you a central place to manage Git repositories, collaborate on your source code, and guide you through the development flow.
Code
The bitbucket-amplify.yml
file (attached) contains the AWS CloudFormation template for this pattern.
Epics
Task | Description | Skills required |
---|---|---|
(Optional) Create a Bitbucket repository. |
Note: You can also use an existing Bitbucket repository. | DevOps engineer |
Open the workspace settings. |
| DevOps engineer |
Create an OAuth consumer. |
| DevOps engineer |
Obtain OAuth access token. |
Important: Replace 2. Record the access token without using the quotation marks. The token is only valid for a limited time and the default time is two hours. You must run the AWS CloudFormation template in this timeframe. | DevOps engineer |
Task | Description | Skills required |
---|---|---|
Download the AWS CloudFormation template. | Download the | |
Create and deploy the AWS CloudFormation stack. |
5. Choose Next and then choose Create Stack. | DevOps engineer |
Task | Description | Skills required |
---|---|---|
Deploy the code to the branch in your repository. |
For more information about this, see Basic Git commands | App developer |
Related resources
Authentication methods
Attachments
To access additional content that is associated with this document, unzip the following file: attachment.zip