mount EFS on AWS ECS
according to official document Using Data Volumes in Tasks there is two way for ECS -> EFS mount
Docker volumes — via *dockerVolumeConfiguration in volume configuration Tutorial: Using Amazon EFS File Systems with Amazon ECS
Bind mounts -- via *efsVolumeConfiguration in volume configuration How can I create a Docker volume using Amazon EFS in Amazon ECS
use EFS in ECS Task
create EFS
ECS -> Task definitions -> *Create Task or *Create new revision
in task definition -> Volumes -> Add volume
input EFS info
References
Use volumes
for set volume you need access EFS via instance at least once (in same VPC)
create EFS and
create Cluster for access EFS
wuc---qa---ECS-EFS-accessor
for access instance need to dummy accessor cluster.
and then access to instance directly
and don't forget key-pair set to 'wuc-devops'
To access your instance:
Open an SSH client. (find out how to connect using PuTTY)
Locate your private key file (wuc-devops.pem). The wizard automatically detects the key you used to launch the instance.
Your key must not be publicly viewable for SSH to work. Use this command if needed:
Connect to your instance using its Public DNS:
Example:
Please note that in most cases the username above will be correct, however please ensure that you read your AMI usage instructions to ensure that the AMI owner has not changed the default AMI username.If you need any assistance connecting to your instance, please see our connection documentation.
after access instance you should follow
How can I create a Docker volume using Amazon EFS in Amazon ECS?
Using Data Volumes in Tasks
Last updated
Was this helpful?