Hi all, I'm using fargate to set up my task enviro...
# prefect-community
a
Hi all, I'm using fargate to set up my task environment and using non-dockerized containers in s3. I can see the task starting on fargate and I'm connected to the cluster, but I do not see the flow running. It's stuck after "Deploying flow run " and "Adding tags for flow_id and version". Not sure why it's stuck 😕 cc: @itay livni
fargate.py
Copy code
from prefect.agent.fargate import FargateAgent
agent = FargateAgent(
    #
    enable_task_revisions=True,
    launch_type="FARGATE",
    taskRoleArn="arn:aws:iam::#####61:role/ayang-role",
    executionRoleArn="arn:aws:iam::#####61:role/ayang-role",
    family="#####-task",
    cluster="#####-fargate-cluster",
    networkConfiguration={
        "awsvpcConfiguration": {
            "assignPublicIp": "ENABLED",
            "subnets": ["subnet-#####11"],
            "securityGroups": []
            }
    },
    cpu="1024",
    memory="4096",
    containerDefinitions = [
        {
            "logConfiguration": {
                "logDriver": "awslogs",
                "options": {
                    "awslogs-group": "/ecs/my-first-task",
                    "awslogs-region": "us-east-2",
                    "awslogs-stream-prefix": "ecs"
                }
            },
            "image": "#####.<http://dkr.ecr.us-east-2.amazonaws.com/pga_scraper:latest|dkr.ecr.us-east-2.amazonaws.com/pga_scraper:latest>",
            "name": "pga_scraper"
        }
    ],
    labels=["s3-flow-storage"]
)
agent.start()
k
Hey @Aaron Y, Let me get some more information for you. First off, are you currently using the open source UI?
a
yup! so the flow stays on yellow and never ends
k
Noice, and you've configured your
~/.prefect/config.toml
to setup that infrastructure and run
prefect backend server
?
a
Copy code
[cloud]
use_local_secrets = false

[flows]
checkpointing = true

[cloud.agent]
auth_token = <"runner-token">
should i run
prefect backend server
again just in case?
k
Sure, just want to ensure you received
Backend switched to server
a
i
@Kyle Moon-Wright quick clarification@Aaron Y is using free tier cloud
k
Ah great, in that case we definitely want the backend set to cloud with
prefect backend cloud
. Are we able to see the health of the Agent on the agent management in the UI and that it's querying Cloud for flow runs?
a
i
In the UI he see's the flow being submitted. In the aws ecs console the task is running but the flow is not being executed.
k
Hmm unfortunately I'm not too familiar with Fargate configurations, but it does seem like an issue with the agent despite your provided config which looks good. Sanity check question: this flow's environment has exact same labels as your agent?