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.

Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions