AWS Amplify-CLI Headless & CI/CD

Rigoberto Miranda
5 min readMay 20, 2020

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

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.

--

--

Rigoberto Miranda

Software Engineer with 7 years of experience at companies like Honeywell Aerospace and Accenture. Currently innovating at Red Ventures.