diff --git a/src/run-task.sh b/src/run-task.sh index eb1ae78..5d7139e 100755 --- a/src/run-task.sh +++ b/src/run-task.sh @@ -37,7 +37,7 @@ if [[ "$SERVICE_TYPE" == "FARGATE" ]]; then TASK_ID=$(aws ecs run-task \ --cluster $CLUSTER_NAME \ --task-definition $TASK_ARN \ - --network-configuration "awsvpcConfiguration={subnets=[${SUBNETS}]}" \ + --network-configuration "awsvpcConfiguration={subnets=[${SUBNETS}],securityGroups=[${SECURITY_GROUPS}]}" \ --launch-type FARGATE \ --query="tasks[0].taskArn" \ --output=text)