Rajdeep Rao
04/26/2021, 10:08 PMKevin Kho
task_definition_path
?Rajdeep Rao
04/26/2021, 10:14 PMtask_definition_path
param in the run_config() that you're talking about?Rajdeep Rao
04/26/2021, 10:15 PMRajdeep Rao
04/26/2021, 10:15 PMRajdeep Rao
04/26/2021, 10:26 PMfrom prefect import task, Flow
from prefect.storage import Docker
from prefect.run_configs import ECSRun
@task(log_stdout=True)
def task_name():
do task_logic
print(value)
return(value)
with Flow("Test-Rostering-Flow-3", storage=Docker(registry_url="url",
image_name="test",
base_image="image"
)) as flow:
value = task_name()
networkConfiguration = {
'awsvpcConfiguration': {
'securityGroups': [
'sg-xxxxxx',
]
}
}
flow.run_config = ECSRun(
task_role_arn="arn:aws:iam::xxxx:role/somethingTaskRole",
run_task_kwargs=networkConfiguration,
env={"SOME_VAR": "value"})
print(flow.run_config)
flow.run()
flow.register(project_name="STAGING/test-setup", labels=['staging'])
Rajdeep Rao
04/26/2021, 10:28 PMKevin Kho
Rajdeep Rao
04/26/2021, 10:40 PMKevin Kho
Rajdeep Rao
04/27/2021, 2:28 AMprefect agent start fargate
and I believe that's deprecated. I'm going to run an ECS agent and see if that does the trickRajdeep Rao
04/27/2021, 3:40 AMRajdeep Rao
04/27/2021, 3:41 AMKevin Kho