Skip to content

AWS Copilot v1.33: run local --use-task-role, and run local depends_on support

Posted On: January 8, 2024

The AWS Copilot core team is announcing the Copilot v1.33 release.

Our public сommunity сhat has over 500 people participating, and our GitHub repository has over 3,100 stars on GitHub 🚀. Thanks to every one of you who shows love and support for AWS Copilot.

Copilot v1.33 brings big enhancements to help you develop more flexibly and efficiently:

  • run local --use-task-role: Elevate your local testing experience with the ECS Task Role using the new --use-task-role flag. See detailed section
  • run local depends_on support: Local run containers now respects depends_on in your service manifests. See detailed section
What’s AWS Copilot?

The AWS Copilot CLI is a tool for developers to build, release, and operate production-ready applications on AWS. From getting started, pushing to staging, and releasing to production, Copilot can help manage the entire lifecycle of your application development. At the foundation of Copilot is AWS CloudFormation, which enables you to provision Infrastructure as Code. Copilot provides pre-defined CloudFormation templates and user-friendly workflows for different types of microservice architectures, enabling you to focus on developing your application, instead of writing deployment scripts.

See the section Overview for a more detailed introduction to AWS Copilot.

Use ECS Task Role for copilot run local

copilot run local now has a flag --use-task-role. When enabled, Copilot will retrieve the IAM permissions from your deployed service and inject them into the containers created by run local. This means that your containers will have the same permissions that they do on the cloud, enabling you to test more accurately.

Container dependencies support for copilot run local

copilot run local now respects the depends_on specified in the service manifest.

For example:

image:
  build: ./Dockerfile
  depends_on:
    nginx: start

nginx:
  image:
    build: ./web/Dockerfile
    essential: true
    depends_on:
      startup: success

startup:
  image:
    build: ./front/Dockerfile
    essential: false

This means that your main container will start only after nginx sidecar container has started and nginx will start only after startup container is completed successfully.