I'm nearly there on getting my first successful fl...
# prefect-getting-started
n
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.
I've been following this guide (https://docs.prefect.io/3.0/deploy/infrastructure-examples/serverless) and the
prefect work-pool create
step went fine. What am I missing here?
Copy code
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",
    )
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
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 😞
181 Views