1 Answer
- Newest
- Most votes
- Most comments
0
From this page: https://docs.aws.amazon.com/lambda/latest/dg/chapter-layers.html
When you add a layer to a function, Lambda extracts the layer contents into the /opt directory in your function’s execution environment. All natively supported Lambda runtimes include paths to specific directories within the /opt directory. This gives your function access to your layer content. For more information about these specific paths and how to properly package your layers, see Packaging your layer content.
I would update your code to open /opt/colorchart.csv as below and test the function.
with open('/opt/colorchart.csv', mode ='r')as file: csvFile = csv.reader(file) for lines in csvFile: pass

Yes it works. Thank you very much!
Awesome! Glad to help!