created - October 6, 2020

AWS just launched a fresh CLI recently - copilot. AWS says this CLI is for containerised applications. So the target audience seems to be people using ECS and Fargate. I decided to try this new stuff.

Installation

The installation for Mac is quite simple. You use homebrew like -

brew install aws/tap/copilot-cli

For windows and Linux refer - https://github.com/aws/copilot-cli/wiki/Installation#manually

Prerequisites

  1. aws cli. If you do not have that you might want to install and configure that. Steps here and here
  2. docker

Initialisation

I am using a simple html file to deploy to in a container using a simple Dockerfile.

The first command you will have to run to initialise is

copilot init

This asks you a few questions and sets up the following things for you in the AWS account.

  1. Virtual Private Cloud (VPC) on 2 Availability Zones (AZs), which includes
    1. Internet Gateway
    2. Public Subnet
    3. Private Subnet
    4. Route Table
  2. ECS Cluster