AWS Amplify-CLI Headless & CI/CD
This article explains how to use AWS Amplify-CLI Headless Mode and GitHub Actions as our CI/CD to deploy a Website or Mobile Application Backend (Infrastructure) without directly interacting with the Amplify CLI. Also, it includes how to set up the project to auto-generate the configuration and GraphQL files.
Follow me on Twitter: @Rmiranda_s
Requirements
- Node.js version 10.x and NPM version 6.x or greater
- AWS Account
- Amplify CLI
Note: The full code can be found here.
Table of Contents
- Let’s get started
- Initializing the Project
- Backend (Infrastructure)
- Auto Generate Files
- Push the Project
- CI/CD (GitHub Actions)
Let’s get started!
Amplify-CLI Headless Mode, allow us to pass data (Strings, Integers, and JSON objects) thought arguments to the Amplify commands. It is essential to provide all the information needed by the command, if a required key is missing, the CLI prompt for input (work non-interactively). We don’t want the CLI to prompt for input, because this will break our CI/CD pipeline.