Ao usar o AWS re:Post, você concorda com os AWS re:Post Termos de uso

How to set the subnet priority of ecs Fargate task

0

Usually, when setting the ECS fargate service, you need to add one or more subnet for the service. When the service creates a task, is the subnet of the task random? Is there any way for me to set the priority of the subnet for ECS service? For example, the priority of the subnet set to 1a is the highest, followed by 1b, and finally 1c. In this way, 1a is preferred when starting a task, and 1b is selected when starting the same task again.

Thank you for any answer!

1 Resposta
1
Resposta aceita

For using Fargate for a few years now, the short answer is no, you wouldn't be able to dictate which subnet to go to. Although not sure why you'd want to do that.

However, if you used EC2 instances, with ASG, you could I suppose create 1 ASG + Capacity Provider combination, with each ASG using only 1 subnet / only subnets in the same AZ, and set a different weight to each of them. When placing containers it will then follow the weight list.

profile picture
respondido há 2 anos
profile picture
ESPECIALISTA
avaliado há 5 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas