The EFS mounted on ec2 is accessed separately from EFS accessed during ECS jobs. The EFS is mounted on the ec2 during the ansible playbook tasks. Then all the workflow (i.e. Prefect) tasks that run directly on the ec2 can access it, such as tasks initializing directory structure or copying tasks between EFS and s3 bucket, etc. However the EFS is accessed directly via a Volume mount in the ECS tasks.
This makes testing and mocking harder. For example if we run an agent locally, the directory is initialized on the local machine, but then in the ECS task, the docker process tries to create files/folders directly on the actual EFS.
The
EFS
mounted onec2
is accessed separately fromEFS
accessed duringECS
jobs. TheEFS
is mounted on theec2
during theansible
playbook tasks. Then all the workflow (i.e. Prefect) tasks that run directly on theec2
can access it, such as tasks initializing directory structure or copying tasks betweenEFS
ands3
bucket, etc. However theEFS
is accessed directly via a Volume mount in theECS
tasks.This makes testing and mocking harder. For example if we run an agent locally, the directory is initialized on the local machine, but then in the ECS task, the docker process tries to create files/folders directly on the actual
EFS
.