I'm nearly there on getting my first successful flow run with an ECS work pool, but I keep getting a Crashed run with this error:
Copy code
Flow run infrastructure exited with non-zero status code:
Exited with non 0 code. (Error Code: 1)
This may be caused by attempting to run an image with a misspecified platform or architecture.
from prefect import flow
from prefect.docker.docker_image import DockerImage
from prefect_aws import AwsCredentials
@flow(log_prints=True)
def hello_world(name: str = "world", goodbye: bool = False):
print(f"Hello {name} from Prefect! 🤗")
if goodbye:
print(f"Goodbye {name}!")
creds = AwsCredentials.load("awscredentials")
print(creds.aws_access_key_id)
if __name__ == "__main__":
hello_world.deploy(
name="ecs-test-deployment",
image=DockerImage(name="my-pipeline", dockerfile="infrastructure/docker/Dockerfile"),
work_pool_name="my-pipeline-workpool",
)
Nash Taylor
09/17/2024, 3:23 AM
This was pebkac, feel free to ignore. To anyone searching for this in the future: make sure
prefect
is on the
PATH
in your Docker image. Doh.
b
Bogdan Posa
09/19/2024, 7:57 AM
Hello @Nash Taylor How can I configure an already image hosted on ECR to be used to run my flow? I cannot find an example for this use-case using python code, only yaml 😞
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.