badasstronaut
11/16/2022, 7:33 PMprefect_aws
and here’s an example of my ecs.py infra block:
ecs = ECSTask(image='custom-prefect-dask:latest',
cpu='512',
memory='2048',
cluster='arn:aws:ecs:us-east-1:...Cluster',
execution_role_arn='arn:aws:iam::...Role',
task_role_arn='arn:aws:iam:...Role',
task_start_timeout_seconds=300,
configure_cloudwatch_logs=True,
launch_type='FARGATE_SPOT',
vpc_id='vpc-...',
task_customizations=[dict(op='replace',
path='/tags',
value=[dict(key='TAG_1', value='Prefect'),
dict(key='TAG_2', value='POC')]),
dict(op='replace',
path='/networkConfiguration/awvpcConfiguration/assignPublicIp',
value='DISABLED')],
env={'PREFECT_API_URL': '<http://prefect.internal>..../api'})
Expected result: The prefect
task reflects the tags provided in task_customizations
Actual result: Only the default <http://prefect.io/|prefect.io/>
tags are generated on the prefect
task
EDIT: This turned out to be due to an outdated version of prefect-aws
. The code block above works as expected.prefect-aws
on my local machine, which obviously runs ecs.py
.Mason Menges
11/17/2022, 12:48 AMbadasstronaut
11/17/2022, 12:51 AM