Kelvin DeCosta
02/07/2023, 12:06 PMECSTask
infra block by specifying custom values for cpu
and memory
.
Any help is appreciated!Kelvin DeCosta
02/07/2023, 12:11 PMDeployment.build_from_flow
to create our deployments programmatically:
• flow
is the function that defines the flow logic
• infrastructure
is set to the ECSTask
block
I'd like to know the most reliable manner (a simple code example) to pass parameters to Deployment.build_from_flow
(is it infra_overrides
?) or modify the ECSTask
block (without changing the default settings on the block).
Ideally, I'm hoping for something like infra_overrides={"cpu": 1024, "memory": 4096}
.
Also, I'm curious about whether this would register a new task definition every time the deployment is run.Christopher Boyd
02/07/2023, 1:03 PMKelvin DeCosta
02/08/2023, 6:12 AMStephen Lloyd
02/08/2023, 10:51 AMChristopher Boyd
02/08/2023, 2:08 PMRun a task with custom memory and CPU requirements
ECSTask(command=["echo", "hello world"], memory=4096, cpu=2048)
Christopher Boyd
02/08/2023, 2:09 PMRun a task with custom VPC subnets
ECSTask(
command=["echo", "hello world"],
task_customizations=[
{
"op": "add",
"path": "/networkConfiguration/awsvpcConfiguration/subnets",
"value": ["subnet-80b6fbcd", "subnet-42a6fdgd"],
},
]
)
Christopher Boyd
02/08/2023, 2:09 PMKelvin DeCosta
02/09/2023, 11:05 AMtask_customizations
? Also, how would the task_customizations
look, if we wanted to specify a certain amount for cpu
/ memory
?