Mateo Merlo01/01/2023, 8:27 PM
I got the error on the image.
Anyone with this error?
from prefect_aws import AwsCredentials from prefect_aws.ecs import ECSTask aws_credentials_block = AwsCredentials( aws_access_key_id="****", aws_secret_access_key="****", ) aws_credentials_block.save("prod", overwrite=True) ecs = ECSTask( aws_credentials=aws_credentials_block, image="<http://631792532656.dkr.ecr.us-east-1.amazonaws.com/prefect2-image:latest|631792532656.dkr.ecr.us-east-1.amazonaws.com/prefect2-image:latest>", # image pushed to ECR cpu="256", memory="512", stream_output=True, configure_cloudwatch_logs=True, cluster="prefect2EcsCluster", execution_role_arn="arn:aws:iam::631792532656:role/prefectECSAgentTaskExecutionRole", task_role_arn="arn:aws:iam::631792532656:role/prefectTaskRole", ) ecs.save("prod", overwrite=True)
Ryan Peden01/01/2023, 8:32 PM
0.2.1 make a difference? There were some changes in it that might help.
Mateo Merlo01/01/2023, 8:34 PM
Ryan Peden01/01/2023, 8:35 PM
Mateo Merlo01/01/2023, 8:38 PM
Ryan Peden01/01/2023, 9:00 PM
package initializes, it tries to load collections like
automatically. However, in this case it is raising an error if
is loaded first. We will fix this if needed, but in the meantime you can do one of the following: • Use the script as-is and ignore the error message. • Add
to the top of your file before the
imports. If you use PyLint or another linter, you might need to add a comment to get it to ignore the unused import.
Mateo Merlo01/01/2023, 9:37 PM
at the top and it works without the error. 🙌🏼