Reputation: 802
I was wondering what's the best way (if it is possible) to access local files from a lambda function.
Basically I want to get a .txt file that I have at C://Users/User/Desktop or any directory and put that file inside an s3 bucket.
I have been able to put information into a bucket from a lambda function (Hardcoded info) but I'm struggling in getting info from host to AWS. From what I have seen, the way to go is to use AWS IoT Greengrass but after hours of trying to make it work, things are not looking good.
Is AWS IoT Greengrass the only option or is it there a simpler way of accessing local files?
Upvotes: 0
Views: 2742
Reputation: 46879
It is not at all possible to have a lambda function access local files directly - something running on your local machine is going to need to serve those files TO lambda, lambda can't retrieve them.
Without knowing anything about the problem you are trying to solve, I would certainly start with the thought of pushing those files to S3, and then let lambda do its thing.
Upvotes: 1