'Using AWS Lambda, how to check if a file exists in FSx, and if it exists, move the folder it is in to a target directory in another FSx share?

I am comfortable with Python but have no experiences with AWS, FSx, or Lambda.

I need to access an FSx share, and iterate to the nth level of every root folder. After the nth iteration, I need to check if "example.txt" exists in that folder. If it does, I need to move the current folder I am in to a different FSx share.

There are very few resources that I've been able to find for how to complete this task, so anything would be greatly appreciated. I would like to complete this task using Python. Thank you.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source