Madison Schott
11/14/2022, 9:51 PMSTORAGE = Docker(registry_url='<http://ecr.us-west-2.amazonaws.com/|ecr.us-west-2.amazonaws.com/>',
image_name='prefect-flows',
dockerfile='dbt_snowflake/DockerFile')
RUN_CONFIG = ECSRun(run_task_kwargs={'cluster': 'prefect-prod'},
env={"PREFECT__LOGGING__LEVEL": "DEBUG"},
execution_role_arn='xx',
labels=['ecs-agent', 'prod', 'winc'])
Nate
11/14/2022, 10:05 PMprefect_aws
so
pip install prefect_aws
prefect block register -m prefect_aws.ecs
and then you can create an ECSTask block in the UI that you can attach via prefect deployment build ... --ib ecs-task/your-block
when you're creating the ECSTask block, you can pass an image
(like the one that your dbt_snowflake/DockerFile
produces) that's stored in ECR or somewhere elseMadison Schott
11/14/2022, 10:11 PMNate
11/14/2022, 10:12 PM❯ prefect block register -m prefect_aws.ecs
Successfully registered 2 blocks
┏━━━━━━━━━━━━━━━━━━━┓
┃ Registered Blocks ┃
┡━━━━━━━━━━━━━━━━━━━┩
│ AWS Credentials │
│ ECS Task │
└───────────────────┘
To configure the newly registered blocks, go to the Blocks page in the Prefect UI.
Madison Schott
11/14/2022, 10:13 PMNate
11/14/2022, 10:14 PMMadison Schott
11/14/2022, 10:17 PMNate
11/14/2022, 10:19 PMprefect config view
or set your active cloud workspace with prefect cloud workspace set
Madison Schott
11/14/2022, 10:21 PMNate
11/14/2022, 10:21 PMMadison Schott
11/14/2022, 10:22 PMNate
11/14/2022, 10:23 PMMadison Schott
11/14/2022, 10:25 PMNate
11/14/2022, 10:26 PM