Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Provisioned concurrency isn't worth it in my experience. You can just use, say, a CloudWatch rule to ping your desired number of instances every 5-odd minutes and keep them warm. 288 pings per day for 100 instances at 100ms per instance/ping is 2,880 seconds of execution time, or 5,760 GB-seconds at 2GB RAM (1 full vCPU and a bit). At $0.0000166667 per GB-second, that's $35 a year. You could cut that in half with smarter pings than e.g. [1], but it's not worth the engineering cycles at this price.
1. Python version: https://github.com/robhowley/lambda-warmer-py
I use serverless to orchestrate my lambdas. They help out with the tradeoff between micro-lambdas and monolith. I get a single code base where I can reuse code, write tests and deploy all at once and serverless packages it up into individual lambdas. You can also manage other resources there in a single serverless file including iam permissioning, databases, or any other aws service. So your entire app is in that config file.
Sometimes it bites you in the ass though and you get cryptic errors when trying to update the app in cloudfront, but overall I think its worth it.
[0] https://www.serverless.com/
If you are using CDK then check out SST: https://github.com/serverless-stack/serverless-stack
It's based on CDK and has a great local development environment for Lambda. It allows you to set breakpoints and test it locally: https://serverless-stack.com/examples/how-to-debug-lambda-fu...
Related posts
- Should Lambda services be built in the cloud (vs. local environment)?
- AWS Amplify with Auth is an unworkable mess
- How do you structure your engineering teams for serverless development?
- [Free Download] Ebook for building full-stack apps using serverless and React on AWS 🔥
- First look at ⚡️ Serverless-stack⚡️ Build full-stack serverless apps on AWS!