serverless-patterns
Our great sponsors
serverless-patterns | aws-lambda-runtime-interface-emulator | |
---|---|---|
32 | 4 | |
1,449 | 871 | |
3.1% | 1.7% | |
9.9 | 5.2 | |
6 days ago | 4 days ago | |
Python | Go | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
serverless-patterns
-
Generative (A)IaC in the IDE with Application Composer
You may be aware of Serverlessland, a treasure trove of developer-centered content and examples of serverless applications. I decided to take one of their more popular (and AI-focused) tutorials, titled “Use GenAI capabilities to build a chatbot”, and recreate it with App Composer and our trusty AI assistant. Here we go!
- AWS Lambda: Serverless Computing Made Easy
-
Simple AWS: 20 Advanced Tips for Lambda
Serverless Land is a place with a ton of serverless resources.
-
A Beginner's Guide to the Serverless Application Model (SAM)
If you're looking for examples, you can check out my GitHub, it's full of SAM templates that cover a wide range of use cases. Serverless Land is another fantastic resource full of reference material. If you are trying to build something but can't quite figure it out in SAM, remember - it's all just CloudFormation. Browse the docs to see how to define that stubborn resource.
-
Introducing samp-cli for local lambda debugging
I will use dynamodb-streams-to-eventbridge-outbox-pattern by David Boyne as an example.
- Aws lambda
-
SQS -> SNS pattern??
This is definitely not the most common pattern. As an independent data point, you can look at the AWS-maintained serverlessland.com, where ALL the patterns that include SNS and SQS are going SNS > SQS.
-
What are your study methods for AWS certs?
For all my associated exams I used Mareek/TD, labs and for SAP also went through SAP course of A. Cantrill, also tools like https://serverlessland.com/ and aws event talks on YouTube can help you understand concepts.
-
AWS Resources for noob
For serverless, serverlessland.com
-
What are some senior level learning resources you recommend for improving as a backend engineer?
If you’re using AWS serverlessland is maintained by AWS and has great resources
aws-lambda-runtime-interface-emulator
-
Understanding the AWS Lambda Runtime API
Enter the aws-lambda-runtime-interface-emulator. This tool will allow us to emulate the AWS Lambda Runtime API locally (I suspect that the AWS SAM uses this tool under the hood as well). The aws-lambda-runtime-interface-emulator is designed to be used with Docker. Still, nothing stops us from containerizing our code for the sake of development and then, whenever we are ready, proceeding with deployment how we wish to. This local workflow is a bit more involved than the previous one, but it might be a valid alternative for those not using AWS SAM or are already using containers to deploy their Lambdas.
-
Puppeteer performance in AWS Lambda Docker containers
There is a special tool to test AWS Lambda images locally. It's called AWS Lambda Runtime Interface Emulator (RIE). You have two options: include RIE in your image or install it locally. We don't need it in the production image, so let's choose the second option. We will download binary locally and mount it to our image if we need to test it.
-
Ask HN: Does anyone else find the AWS Lambda developer experience poor?
Suggestions:
1. If you are building APIs and using Lambda functions as targets from an API Gateway API, look into libraries like serverless-wsgi (Python) or wai-handler-hal (Haskell) that translate between API Gateway request/response payloads and some kind of ecosystem-native representation. Then as long as you're writing code where all state gets persisted outside of the request/response cycle, you can develop locally as if you were writing for a more normal deploy environment.
2. Look into the lambda runtime interface emulator ( https://github.com/aws/aws-lambda-runtime-interface-emulator... ). This lets you send invoke requests to a fake listener and locally test the lambda more easily. While the emulator is provided in the AWS container base images, you don't need to run it inside a container if you're deploying with zip files. (AWS-provided container images automatically enable the emulator if not running in a lambda runtime environment, and using docker for port remapping is nice. But not at all required.)
3. Get really good at capturing all requests to external services, and mocking them out for local testing. Whether this is with free monads, effect systems, gateway classes will depend on your language and library choices.
What are some alternatives?
sst - Build modern full-stack applications on AWS
Moto - A library that allows you to easily mock out tests based on AWS infrastructure.
serverless-offline - Emulate AWS λ and API Gateway locally when developing your Serverless project
serverless-application-model - The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.
up - Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS.
serverless-graphql - Serverless GraphQL Examples for AWS AppSync and Apollo
docker-lambda - Docker images and test runners that replicate the live AWS Lambda environment
aws-lambda-go - Libraries, samples and tools to help Go developers develop AWS Lambda functions.
bref - Serverless PHP on AWS Lambda
aws-lambda-python-runtime-interface-client