'AWS Copilot v1.32:
run local --proxy,
run local --watch, imported ALB support
Posted On: November 9, 2023
The AWS Copilot core team is announcing the Copilot v1.32 release.
Copilot v1.32 brings big enhancements to help you develop more flexibly and efficiently:
copilot run local --proxy: Proxy outbound traffic from your local containers to services and RDS instances in your environment. See detailed section
copilot run local --watch: Automatically rebuilds your containers when you make changes to your code. See detailed section
- Importing ALBs: You can front your Load-Balanced Web Services with existing ALBs. 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.
copilot run local --proxy
--proxy flag on
copilot run local enhances your local development experience by making it possible for your local containers to talk to services deployed in your environment.
For example, imagine you have an environment with two services,
orders, that both have Service Connect enabled.
orders has an RDS addon deployed that it uses for storing data.
You can now run
copilot run local --proxy --name orders and your local
orders containers will be able to reach:
usersservice, using its service connect URL (defaults to
orders's RDS database, using any DB instance url (like
app-env-orders-random-characters.us-west-2.rds.amazonaws.com:5432) or DB cluster URL.
copilot run local --watch
--watch flag watches your workspace and rebuilds your containers when you make changes to your code so you can develop continuously. This is extremely useful when used with
--proxy, as it allows you to save the overhead time required to set up proxy each time you would rebuild your application!
Copilot now supports the new field
http.alb in the Load-Balanced Web Service manifest. Rather than letting Copilot create a new Application Load Balancer in your environment to be shared among all load-balanced services, you may designate an existing public-facing ALB for a specific Load-Balanced Web Service (LBWS). Specify the ARN or name of an ALB from your VPC in your LBWS manifest:
http: alb: [name or ARN]