Aaron Y
07/13/2020, 3:53 PMfargate.py
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()
Kyle Moon-Wright
07/13/2020, 4:04 PMAaron Y
07/13/2020, 4:04 PMKyle Moon-Wright
07/13/2020, 4:05 PM~/.prefect/config.toml
to setup that infrastructure and run prefect backend server
?Aaron Y
07/13/2020, 4:08 PM[cloud]
use_local_secrets = false
[flows]
checkpointing = true
[cloud.agent]
auth_token = <"runner-token">
should i run prefect backend server
again just in case?Kyle Moon-Wright
07/13/2020, 4:17 PMBackend switched to server
Aaron Y
07/13/2020, 4:17 PMitay livni
07/13/2020, 4:18 PMKyle Moon-Wright
07/13/2020, 4:21 PMprefect 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?Aaron Y
07/13/2020, 4:21 PMitay livni
07/13/2020, 4:22 PMKyle Moon-Wright
07/13/2020, 4:53 PM