So what does a well-made AWS Lambda in Python actually look like?
I Created SSL Checker in AWS Lambda Function
Python Lambda event and responses questions
See here for your python-specific questions: https://docs.aws.amazon.com/lambda/latest/dg/python-programming-model-handler-types.html
A lambda can return anything, or nothing at all. However, if you want to call via HTTP, you're gonna have to put an API Gateway or ALB in front of it, which uses the status code, headers, and body to generate a http response.
More on reddit.comImporting Function from Parent Directory in Python Lambda Function for AWS Amplify
Videos
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.