What's the best way to read a file that's in a lam...
# aws
l
What's the best way to read a file that's in a lambda's zip? I have some code in a CallbackFunction's
callback
property (typescript), and it uses
fs.readFileSync("subdir/file")
. This works so long as subdir/file is relative to the pulumi project. But since the CallbackFunction is defined in a component resource in a different subdirectory, it's pretty confusing. I'd like subdir/file to be relative to the directory that the CallbackFunction is defined in.