Occasional EFS mounting problem from ECS Fargate tasks

0

I am currently using Cloudformation template to create custom resources using AWS Lambda. One of the custom resources will further run a ECS task to create somethings in EFS. I notice that the ECS Fargate task sometimes fail to mount the EFS access point:

Resourceinitializationerror: failed to invoke EFS utils commands to set up EFS volumes: stderr: Failed to resolve "fs-008e4fec696b1ea05.efs.us-east-1.amazonaws.com" - check that your file system ID is correct, and ensure that the VPC has an EFS mount target for this file system ID. See https://docs.aws.amazon.com/console/efs/mount-dns-name for more detail. Attempting to lookup mount target ip address using botocore. Failed to import necessary dependency botocore, please install botocore first. : unsuccessful EFS utils command execution; code: 1

I have added about 120 seconds of delay to the custom resource's Lambda before invoking the ECS task. I have added DependsOn to the custom resource to wait for the creation of all mounting targets and access point. However, the issue still happen occasionally. So, I assume that I need to handle the error exception of this mounting issue and re-run the ECS task. Is it the right direction to handle this issue? Thanks.

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠