Nikola Lusic
05/27/2021, 5:17 PMcpu
and memory
parameters of the ECSRun doesn't seem to have any effect. It seems that the agent always creates a task with 1CPU and 2GB RAM.
Do you maybe have some pointers for this issue?Kevin Kho
Nikola Lusic
05/27/2021, 5:22 PMrun_config = ECSRun(
image=ec.get("DOCKER_IMAGE"),
env=env,
cpu=512,
memory=2048)
storage = S3(bucket=ec.get("S3_BUCKET"))
result = S3Result(bucket=ec.get("S3_BUCKET"))
with Flow(
name="flow_name",
run_config=run_config,
storage=storage,
result=result
) as flow:
flow_steps()
Nikola Lusic
05/27/2021, 5:23 PMKevin Kho
flow.run_config = ECSRun(cpu="2 vcpu", memory="4 GB")
Kevin Kho
Nikola Lusic
05/27/2021, 5:26 PMKevin Kho
Nikola Lusic
05/27/2021, 5:27 PMKevin Kho
Nikola Lusic
05/27/2021, 5:37 PMNikola Lusic
05/27/2021, 6:02 PMKevin Kho
Nikola Lusic
05/27/2021, 6:29 PMKevin Kho
Nikola Lusic
05/27/2021, 7:07 PMZanie
Nikola Lusic
05/27/2021, 7:12 PMcpu
and memory
I set in the ECSRun
, the result is always an ECS task that has 1 CPU and 2 GB RAM.Zanie
Zanie
Nikola Lusic
05/27/2021, 7:17 PM{
"ipcMode": null,
"executionRoleArn": "<AWS ROLE>",
"containerDefinitions": [
{
"dnsSearchDomains": null,
"environmentFiles": null,
"logConfiguration": null,
"entryPoint": null,
"portMappings": [],
"command": null,
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "PREFECT__CONTEXT__IMAGE",
"value": "<DOCKER IMAGE>""
}
],
"resourceRequirements": null,
"ulimits": null,
"dnsServers": null,
"mountPoints": [],
"workingDirectory": null,
"secrets": null,
"dockerSecurityOptions": null,
"memory": null,
"memoryReservation": null,
"volumesFrom": [],
"stopTimeout": null,
"image": "<DOCKER IMAGE>",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"name": "flow"
}
],
"placementConstraints": [],
"memory": "2048",
"taskRoleArn": null,
"compatibilities": [
"EC2",
"FARGATE"
],
"taskDefinitionArn": "<TASK DEFINITION ARN>",
"family": "prefect-opal-copy",
"requiresAttributes": [
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.ecr-auth"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "ecs.capability.execution-role-ecr-pull"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "ecs.capability.task-eni"
}
],
"pidMode": null,
"requiresCompatibilities": [
"FARGATE"
],
"networkMode": "awsvpc",
"cpu": "1024",
"revision": 22,
"status": "INACTIVE",
"inferenceAccelerators": null,
"proxyConfiguration": null,
"volumes": [],
"statusString": "(INACTIVE)"
}
Nikola Lusic
05/27/2021, 7:18 PMECSRun
configuration:
ECSRun(labels=["<LABEL>"],
image=ec.get("DOCKER_IMAGE"),
env=env,
cpu=2048,
memory=4096)
Zanie
Zanie
Zanie
Nikola Lusic
05/27/2021, 7:24 PMZanie
Zanie
Nikola Lusic
05/27/2021, 7:28 PMZanie
Zanie
aws ecs describe-tasks
to take a look at your task and see that the settings are correct https://docs.aws.amazon.com/cli/latest/reference/ecs/describe-tasks.htmlZanie
Marvin
05/28/2021, 4:20 PM