I use Github Actions to sync one of my git repo's subfolders (including < 200 very small MD and YAML files) to AWS S3. I then use AWS Lambda to further sync this S3 Bucket with AWS EFS.
How do I synchronise the S3 (or even better - the EFS) bucket with added/changed/deleted files back to my git repository on Github?
I haven't been able to wrap my head around what would the best way to achieve that.
Can you please push me in the right direction?
P.S. I'm not very proficient with git, this whole implementation it's a bit out of my league. :-)
@vonc, thank you for your hint, it moved me in the right direction.
I ended up doing this, which solves my ultimate goal, which is to manage EFS through GIT. I can fully skip S3 / Lambda.
Step 1: sudo mount -t efs -o tls MYFILESYSTEMID:/ efs
Step 2: cd efs
Step 3: git clone --depth 1 --no-checkout --filter=blob:none git@github.com:user/repo
Step 4: cd repo
Step 5: git sparse-checkout set subdirectory
Step 6: git read-tree -mu HEAD
From here on, I can push/pull changes in this particular subdirectory.