update run_task to make it possible to expose ecs task publicly (#2916)

This commit is contained in:
Shuchang Zheng
2025-07-09 16:32:46 -07:00
committed by GitHub
parent b0fab9584b
commit 1d7585b40a

View File

@@ -268,6 +268,7 @@ class AsyncAWSClient:
task_definition: str,
subnets: list[str],
security_groups: list[str],
assign_public_ip: str = "DISABLED",
) -> dict:
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs/client/run_task.html
async with self._ecs_client() as client:
@@ -279,7 +280,7 @@ class AsyncAWSClient:
"awsvpcConfiguration": {
"subnets": subnets,
"securityGroups": security_groups,
"assignPublicIp": "DISABLED",
"assignPublicIp": assign_public_ip,
}
},
)