'Load YAML File in AWS Lambda
I have a bunch of settings and configs that I need AWS Lambda to be able to access. This is not a .py file, so I cannot just import it. In order to load the YAML, I need to specify a path to the file, so how do I do that in Lambda?
My understanding is that Lambda can only read/write to the /tmp folder. But I would like to include this config file with either the lambda layer or as a file in the lambda code package. Either of those two options are not in the /tmp folder and therefore does not provide direct read/write to files there.
Where can I put this YAML file and how can I reach it to read it during runtime?
Solution 1:[1]
Lambda has read access to everything. It only has write access to the /tmp folder. If you are thinking about including the YAML file in a Lambda layer, or in the code package, your code will be able to read the file just fine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mark B |
