different environment variable for a subset of the replicas in ECS
Hello,
one service I have on ECS is called "workers", currently, all those workers listen to the same queue of tasks that we have. I have 3 replicas. I want to do a change and make 2 of the machines listen to 1 queue and the other machine listen to a new queue.
What I need to to spin up 2 replicas with a different environment variables than the other machine. I want to avoid creating new service since there is just a lot of env variables and configs that I don't want to change.
Hi @faisalil!
You can configure env vars in the manifest for each worker service: https://aws.github.io/copilot-cli/docs/manifest/worker-service/#variables
You can configure the subscriptions in the manifests: https://aws.github.io/copilot-cli/docs/manifest/worker-service/#subscribe
See more about worker services here: https://aws.github.io/copilot-cli/docs/concepts/services/#worker-service
Hope this helps!
@huanjani : I am not using AWS queues, my question is simple: can I have a subset of the replicas in 1 service have different env variables than other ones?
Related: https://github.com/aws/copilot-cli/issues/4122, https://github.com/aws/copilot-cli/issues/5525, https://github.com/aws/copilot-cli/issues/2699