Updating files in Amazon EFS - Part 3

Search for a command to run...

No comments yet. Be the first to comment.
This series discusses a few options (DIY and AWS provided) to load and update the files in EFS placed in a private subnet.
Amazon EFS is a widely used AWS service. Be it applications running in EC2 instances or containers or serverless apps, EFS provide the 'external file storage' or a 'shared file storage' capability. Since the same EFS can be mounted from different pla...
AWS DataSync is a powerful service to move data between a range of sources and destinations. Being a managed service, it frees us from having to manage and maintain the infrastructure as well as the data transfer logic. While experimenting with AWS D...
The first part of this blog series discusses updating EFS placed in private subnet using AWS CodePipeline. This post discusses achieving the same using a lambda function as the heart of the solution. Using Lambda function - High Level Have the files...

Amazon EFS is a widely used AWS service. Be it applications running in EC2 instances or containers or serverless apps, EFS provide the 'external file storage' or a 'shared file storage' capability. Since the same EFS can be mounted from different pla...

Many tools and applications publish their docker images to docker hub and other public repositories, and many of them supply a docker-compose file to help with a boiler plate deployment. Those are helpful when you are playing around with the applicat...

This is the scenario where the files are generated or updated to some file share/network drives.
Sometimes, the the files may be generated to a network device that your VPC may have access to, like an on-premise file share. But unfortunately the only file storage type that Fargate can mount is EFS (as of this writing). In such a scenario (assuming that there isn't any mechanism by which the files can be uploaded to S3 bucket) the two methods discussed before wouldn't be sufficient.
One way is to use an EC2 instance, with its sole purpose is to mount the external drive as well as the EFS and copy/sync files from the external drive to EFS. The life cycle of the EC2 instance may be determined based on how often the external drives to EFS sync needs to happen. It can be an instance that is running all the time or something that comes up at scheduled intervals, does the sync and then disappears.

A minimal example for this could be find here in this github repository.
The options discussed so far are DYI and none of it will be of much help if we are dealing with huge amount of data and/or the files from the source are made available to Amazon FSx, object storage systems other than S3 etc. AWS provides a powerful managed solution in the form of AWS DataSync, which can be used to fulfill the scenarios that were covered so far, plus a lot more. In the next part of this series, we will explore AWS Datasync.