README

Amazon ECS CLI v2 - Develop, Release and Operate Container Apps on AWS

⚠️ Before you get started please note that this feature is in preview and the intention is to ensure it meets your requirements and give us any feedback on your use case. Please do not run production workloads till we announce the general availability of this feature. Using the instructions and assets in this repository folder is governed as a preview program under the AWS Service Terms: https://aws.amazon.com/service-terms/ .

What's the ECS CLI?

The ECS CLI is a tool for developers to create, release and manage production ready containerized applications on ECS. From getting started, pushing to a test environment and releasing to production, the ECS CLI helps you through the entire life of your app development.

Got a Dockerfile and some code? Get it up and running on ECS in under 10 minutes, with just one command. Ready to take that app to production? Spin up new environments and a continuous delivery pipeline without having to leave your terminal. Find a bug? Tail your logs and deploy with one tool.

Use the ECS CLI to:

  • Organize all your related micro-services in one project
  • Set up test and production environments, across regions and accounts
  • Set up production-ready, scalable ECS services and infrastructure
  • Set up CI/CD Pipelines for all of the micro-services
  • Monitor and debug your applications from your terminal

Read more about the ECS CLI charter and tenets here.

ecs-cli help

Installing

During preview, we're distributing binaries from our GitHub releases. Instructions for installing the ECS CLI v2 for your platform:

macOS and Linux
Platform Command to install
macOS curl -Lo /usr/local/bin/ecs-preview https://github.com/aws/amazon-ecs-cli-v2/releases/download/v0.0.9/ecs-preview-darwin-v0.0.9 && chmod +x /usr/local/bin/ecs-preview && ecs-preview --help
Linux curl -Lo /usr/local/bin/ecs-preview https://github.com/aws/amazon-ecs-cli-v2/releases/download/v0.0.9/ecs-preview-linux-v0.0.9 && chmod +x /usr/local/bin/ecs-preview && ecs-preview --help

Getting started

Make sure you have the AWS command line tool installed and have already run aws configure before you start.

To get a sample app up and running in one command, run the following:

git clone git@github.com:aws-samples/amazon-ecs-cli-sample-app.git demo-app
cd demo-app
ecs-preview init --project demo      \
  --app api                          \
  --app-type 'Load Balanced Web App' \
  --dockerfile './Dockerfile'        \
  --port 80                          \
  --deploy

This will create a VPC, Application Load Balancer, an Amazon ECS Service with the sample app running on AWS Fargate. This process will take around 8 minutes to complete - at which point you'll get a URL for your sample app running!

watch what happens when you run init

Step By Step Setup

Cleaning up 🧹

Once you're finished playing around with this project, you can delete it and all the AWS resources associated it by running ecs-preview project delete.

Learning more 📖

Want to learn more about what's happening? Check out our getting started guide and a detailed breakdown of all the infrastructure that gets created.

We need your feedback 🙏

The ECS CLI v2 is in developer preview, meaning we want to know what works, what doesn't work, and what you want! Have any feedback at all? Drop us an issue or join us on gitter.

We're happy to hear feedback or answer questions, so reach out, anytime!

Security disclosures

If you think you’ve found a potential security issue, please do not post it in the Issues. Instead, please follow the instructions here or email AWS security directly at aws-security@amazon.com.

License

This library is licensed under the Apache 2.0 License.

Directories

Path Synopsis
cmd
copilot
Package main contains the root command.
Package main contains the root command.
copilot/template
Package template provides usage templates to render help menus.
Package template provides usage templates to render help menus.
internal
pkg/addon
Package addon contains the service to manage addons.
Package addon contains the service to manage addons.
pkg/addon/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/cloudformation
Package cloudformation provides a client to make API requests to AWS CloudFormation.
Package cloudformation provides a client to make API requests to AWS CloudFormation.
pkg/aws/cloudformation/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/cloudformation/stackset
Package stackset provides a client to make API requests to an AWS CloudFormation StackSet resource.
Package stackset provides a client to make API requests to an AWS CloudFormation StackSet resource.
pkg/aws/cloudformation/stackset/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/cloudwatch
Package cloudwatch provides a client to make API requests to Amazon CloudWatch Service.
Package cloudwatch provides a client to make API requests to Amazon CloudWatch Service.
pkg/aws/cloudwatch/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/cloudwatchlogs
Package cloudwatchlogs provides a client to make API requests to Amazon CloudWatch Logs.
Package cloudwatchlogs provides a client to make API requests to Amazon CloudWatch Logs.
pkg/aws/cloudwatchlogs/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/codepipeline
Package codepipeline provides a client to make API requests to Amazon Elastic Container Service.
Package codepipeline provides a client to make API requests to Amazon Elastic Container Service.
pkg/aws/codepipeline/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/ecr
Package ecr provides a client to make API requests to Amazon EC2 Container Registry.
Package ecr provides a client to make API requests to Amazon EC2 Container Registry.
pkg/aws/ecr/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/ecs
Package ecs provides a client to make API requests to Amazon Elastic Container Service.
Package ecs provides a client to make API requests to Amazon Elastic Container Service.
pkg/aws/ecs/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/identity
Package identity provides a client to make API requests to AWS Security Token Service.
Package identity provides a client to make API requests to AWS Security Token Service.
pkg/aws/identity/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/profile
Package profile provides functionality to parse AWS named profiles.
Package profile provides functionality to parse AWS named profiles.
pkg/aws/resourcegroups
Package resourcegroups provides a client to make API requests to AWS Resource Groups
Package resourcegroups provides a client to make API requests to AWS Resource Groups
pkg/aws/resourcegroups/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/route53
Package route53 provides functionality to manipulate route53 primitives.
Package route53 provides functionality to manipulate route53 primitives.
pkg/aws/route53/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/s3
Package s3 provides a client to make API requests to Amazon Simple Storage Service.
Package s3 provides a client to make API requests to Amazon Simple Storage Service.
pkg/aws/s3/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/secretsmanager
Package secretsmanager provides a client to make API requests to AWS Secrets Manager.
Package secretsmanager provides a client to make API requests to AWS Secrets Manager.
pkg/aws/secretsmanager/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/aws/session
Package session provides functions that return AWS sessions to use in the AWS SDK.
Package session provides functions that return AWS sessions to use in the AWS SDK.
pkg/aws/tags
Package tags implements simple functions to manipulate AWS resource tags.
Package tags implements simple functions to manipulate AWS resource tags.
pkg/cli
Package cli contains the copilot subcommands.
Package cli contains the copilot subcommands.
pkg/cli/group
Package groups contains the names of command groups.
Package groups contains the names of command groups.
pkg/cli/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/cli/selector
Package selector provides functionality for users to select an application, environment, or service name.
Package selector provides functionality for users to select an application, environment, or service name.
pkg/config
Package config implements CRUD operations for application, environment, service and pipeline configuration.
Package config implements CRUD operations for application, environment, service and pipeline configuration.
pkg/config/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/deploy
Package deploy holds the structures to deploy infrastructure resources.
Package deploy holds the structures to deploy infrastructure resources.
pkg/deploy/cloudformation
Package cloudformation provides functionality to deploy CLI concepts with AWS CloudFormation.
Package cloudformation provides functionality to deploy CLI concepts with AWS CloudFormation.
pkg/deploy/cloudformation/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/deploy/cloudformation/stack/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/describe/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/docker
Package docker provides an interface to the system's Docker daemon.
Package docker provides an interface to the system's Docker daemon.
pkg/docker/dockerfile
Package dockerfile provides simple Dockerfile parsing functionality.
Package dockerfile provides simple Dockerfile parsing functionality.
pkg/docker/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/ini
Package ini provides functionality to parse and read properties from INI files.
Package ini provides functionality to parse and read properties from INI files.
pkg/manifest
Package manifest provides functionality to create Manifest files.
Package manifest provides functionality to create Manifest files.
pkg/template
Package template renders the static files under the "/templates/" directory.
Package template renders the static files under the "/templates/" directory.
pkg/template/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/term/color
Package color provides functionality to displayed colored text on the terminal.
Package color provides functionality to displayed colored text on the terminal.
pkg/term/cursor
Package cursor provides functionality to interact with the terminal cursor.
Package cursor provides functionality to interact with the terminal cursor.
pkg/term/log
Package log is a wrapper around the fmt package to print messages to the terminal.
Package log is a wrapper around the fmt package to print messages to the terminal.
pkg/term/progress
Package progress provides data and functionality to display updates to the terminal.
Package progress provides data and functionality to display updates to the terminal.
pkg/term/progress/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg/term/prompt
Package prompt provides functionality to retrieve free-form text, selection, and confirmation input from the user via a terminal.
Package prompt provides functionality to retrieve free-form text, selection, and confirmation input from the user via a terminal.
pkg/version
Package version holds variables for generating version information
Package version holds variables for generating version information
pkg/workspace
Package workspace contains functionality to manage a user's local workspace.
Package workspace contains functionality to manage a user's local workspace.