Security groups are configured when tasks or services are launched, not in the task definition. There's a couple options on how to deploy multiple times without re-configuring the networking settings:
- Run your container as an ECS Service. You can deploy new versions of a task definition to the same and have it perform a rolling deployment without changing networking settings.
- Launch tasks using a script or infrastructure as code. Anything done repeatably through the console is a candidate for automation.
Default Security Group for Task DefinitionAccepted Answerasked 11 days ago
Will ECS terminate a task if health check fail during service update termination phase?asked 3 months ago
Where are ECS Task logs being stored and for how long?Accepted Answerasked 3 months ago
update container definitions without redefine whole task definition in ECSasked 2 months ago
How can I get logs of my task failed containerAccepted Answerasked 6 months ago
how to deploy an ecs service with a task definition that has 2 images with blue green deployment?asked 2 months ago
How to have ECS map ports automatically when a task is deployed in EC2?
defining the name of task definition json to run ecs task in github actions
ECS Task Groupsasked 4 years ago