I've been losing myself in rewriting a bunch of lambda functions. I can't help but notice that there's a bunch of different opinions and philosophies that make up the bulk of the samples and documentation.
In my own team, one of the guys wrote his own test framework and schema validation library. Another wrote his own logging library and was a big fan of the Serverless framework. I've been using Lambda Power Tools and unittest myself but my lambdas are pretty vanilla. Three guys, three different development styles.
Everything feels so arbitrary and I'm not sure what actually constitutes a production-ready, well structured Python lambda.
FWIW We use terraform for initial project deployment with codebuild, and I have my own makefiles to deploy if I want to bother outside of it. Most of my lambdas are interfaced by AGW and interact with s3, dynamodb, and sagemaker.
Edit: to be clear - most of these are <200ms calls. I'm not trying to cram crazy things into a lambda. If anyone could share some code samples of some well-done Lambda's I'm happy.
AWS Lambda + Serverless Framework + Python — A Step By Step Tutorial — Part 2 “Using AWS KMS with Lambda to Store & Read Sensitive Data & Secrets”
You do not want to put your access key and secret key in your serverless.yml file. If you do then that file can never be part of a public repository and it becomes difficult to rotate those keys. It’s not necessary to include those keys either since the lambda is already executing with its own set of credentials. You can give access to the SSM parameter using iamRoleStatements.
AWS Lambda + Serverless Framework + Python – A Step by Step “Hello World”
I recommend this framework. I’ve used it in prod and had good results
More on reddit.comAWS Lambda + Serverless Framework + Python – A Step by Step “Hello World”
Looks great! I'm going to give it a crack later today.
More on reddit.comPython & AWS Lambda - Serverless Tram Time Display
The Python here is pretty straightforward and could almost certainly be improved and optimized, but it was my first time deploying a web-app via AWS Lambda so thought this may be a useful write-up for anyone else looking to do the same
More on reddit.com