aws / copilot-cli

The AWS Copilot CLI is a tool for developers to build, release and operate production ready containerized applications on AWS App Runner or Amazon ECS on AWS Fargate.
https://aws.github.io/copilot-cli/
Apache License 2.0
3.53k stars 417 forks source link

QUESTION - is it possible to deploy the same ECS service (with same name) across multiple environments but with different container specs #5882

Closed leon-xz closed 4 months ago

leon-xz commented 4 months ago

What's the best way to deploy a service into different environments using Copilot CLI? In different environment, the service will have different image tag (version), and different container specs (number of containers, CPU/RAM allocations).

It seems to me I have to create different service name for different environments, and I end up having different service name (eg. mysvc-dev, mysvc-stag, mysvc-prod) for the same service. That leads to application internal communication problem, as applications in any environment expect to talk to each other with unified service name.

I can solve this by adding a unified service connect alias for the service in different environment, but that means I have to register an extra endpoint in cloudmap. Wondering is there a better way to do this without creating separate service in different environments.