fl-aws
serverless-patterns
fl-aws | serverless-patterns | |
---|---|---|
1 | 32 | |
15 | 1,463 | |
- | 2.3% | |
0.0 | 9.9 | |
over 7 years ago | 3 days ago | |
Python | ||
Apache License 2.0 | GNU General Public License v3.0 or later |
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.
fl-aws
-
Ask HN: Does anyone else find the AWS Lambda developer experience poor?
Living in my team's bubble i thought everyone runs or tries to run parallel environments: prod, staging, dev, but also an individual (person) or feature env. Why? Because there's no emulator or documentation that will teach you real behavior. Like others have said, AWS seems out of this world. Just like GCP and Azure i might add. Some things you don't expect and they mesmerize you how smart they are. Some you expect and you can't fathom how come you're the "only" one screaming. Random thought: this is how i ended up logging all I bumped into into "Fl-aws" https://github.com/andreineculau/fl-aws
Back to the point: reality is that many build their AWS environment (prod) manually, maybe they duplicate once (dev) also manually, maybe they use some automation for their "code" (lambda) but that's it. This implies it's practically impossible to run end-to-end tests. You can't do that in prod for obvious reasons and you can't do it in dev either - you have many devs queueing, maybe dev is not in sync with prod etc.
My team ran cloudformation end-to-end. We actually orchestrated and wrapped cloudformation (this is yet another topic for not using terraform etc) so that if smth couldn't be done in CFN, it would still be automated and reproducible. Long story short, in 30 minutes (it was this long because we had to wait for cloudfront etc) we had a new environment, ready to play with. A total sandbox. Every dev had their own and it was easy to deploy from a release artifact or a git branch to this environment. Similarly you could create a separate env for more elaborate changes to the architecture. And test in a live environment.
Finally to your question: how do you test end-to-end?
If we talk about lambdas because that's where the business logic lies in a "serverless" architecture, then the answer is by calling the system which will eventually call your lambda/s along the way. If your lambda ia sitting behind AWS gateway, then fire an http request. Is it triggered when objects land on S3? Then push some object to S3. How do you assert? Just the same - http response, S3 changes etc. Not to mention you can also check cloudwatch for specific log entries (though they are not instant).
With this type of a setup, which sounds complex, but it is not since it is 100% reproducible (also from project to project - I had several), adding this proxy-to-my-dev-machine lambda would mean I can make local changes and then fire unit AND end-to-end tests without any changes pushed to AWS, which is the main time/energy consumer imo.
PS: sorry for the wall of text. Like i said i recently realized that the development realities have huge discrepancies, so i tried to summarize my reality :)
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
What are some alternatives?
aws-lambda-runtime-interface-emulator
sst - Build modern full-stack applications on AWS
serverless-offline - Emulate AWS λ and API Gateway locally when developing your Serverless project
up - Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS.
serverless-graphql - Serverless GraphQL Examples for AWS AppSync and Apollo
serverless-application-model - The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.
bref - Serverless PHP on AWS Lambda
LocalStack - 💻 A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline
sam-patterns-collection - Collection of serverless patterns created by sam-patterns-cli
amazon-serverless-datalake-workshop - A workshop demonstrating the capabilities of S3, Athena, Glue, Kinesis, and Quicksight.
faasd - A lightweight & portable faas engine