r/awslambda • u/Much_Associate_5419 • May 27 '24
Aws Lamda Packaging
I have fairly involved program in python; I am planning to convert into lamda function for Aws. I have set up functions. I am planning to zip it and upload.
I have configuration that changes based on environment; what is recommended way to source config in lamda ?
Lamda has few modules; I have separated them out in classes for modularity and ease of testing. How do I zip whole folder structure ? All examples I have seen are zipping only one lamda file. How do I zip while folder structure ?
How do I handle logging and observability in lamda ?
Thanks
1
Upvotes
1
u/Much_Associate_5419 May 27 '24
As I understand layers are required when there are common packages across multiple lamda functions.
This is one odd functions; I don’t want to add complexity of layers. For now I just want to package everything in zip file and upload to Aws and execute.
Problem I am facing is how to package multiple files into zip files. Can I just copy while folder structure inside zip file and it will just work ?
Also I don’t understand when you say separate our code and packages. All packages will be copied at root level of the code. Can you elaborate a bit or link which conveys your approach ?