You can become a serverless blackbelt. Enrol to my 4-week online workshop Production-Ready Serverless and let me take you through building a production-ready serverless application from testing, deployment, security right through to observability. This workshop gives you hands-on experience building something with serverless technologies while giving you a broader view of the challenges you will face as the architecture matures and expands. By the end of the workshop, you should have a clear idea when serverless is a good fit for your system as well as common pitfalls you need to avoid.
Hi, welcome to another weekly update!
Let’s welcome back Blue Matador as this month’s sponsor!
Blue Matador is monitoring alert automation for AWS and Kubernetes environments. Our proactive alerts take the time and toil out of monitoring. Trying to understand baselines and thresholds, and configuring alerts, especially in black boxes like Lambda and K8s, requires significant time and effort. Unlike all the other monitoring tools on the market, Blue Matador eliminates the need to manually configure alerts. After a quick and easy setup, Blue Matador instantly discovers all of your resources, automatically creates hundreds of alerts out-of-the-box and proactively notifies you of critical production issues. We’re so confident you’ll love Blue Matador we’re offering $100 to demo it with our team.
Why you should use temporary stacks when you do serverless. Take advantage of the pay-per-use pricing serverless gives you and create CloudFormation stacks when you’re working on feature branches. You should also consider using temporary stacks when running end-to-end tests on the CI/CD pipeline. We discussed why using temporary stack helps in these situations and some of the tradeoffs to keep in mind.
How to include SNS and Kinesis in your e2e tests. A lot of serverless architectures are heavily event-driven and often utilize SNS topics and Kinesis streams. It’s a good way to build resilient, loosely-coupled systems. But it’s also difficult to include SNS and Kinesis in end-to-end tests. In this post, I outlined several approaches for including SNS and Kinesis in your end-to-end tests.
The best reason to use DynamoDB Streams is…. When should you use DynamoDB Streams instead of Kinesis? In this post, I outline the main differences between the two services and explain what I believe is the best reason for using DynamoDB Streams over Kinesis.
Top 10 Serverless best practices. In this post, I shared my top 10 best practices for working with the Serverless framework.
Step Functions supports dynamic parallelism via the new Map state. This has been one of the most requested features for Step Functions and I’m really glad to see it finally shipped! I have updated the asl-validator and the serverless-step-functions plugin to support this new feature.
Since AWS announced the rollout of the long-await VPC improvement for Lambda, they have completed the rollout to the Frankfurt, Ohio and Tokyo regions. If you’re operating in those regions then there’s on more VPC-related cold starts for your Lambda functions!
Open source updates
NEW! Lumigo CLI
I published a new CLI to help you with your serverless development! It consists of a collection of helper commands for things that I have struggled with myself. For now, you can:
- analyze Lambda costs in all regions
- list functions in all regions and see when they’re last active
- tail events going into SNS/SQS/Kinesis
- replay SQS DLQ events
- delete CloudFormation stacks generated by Serverless framework, by name (without having to check out the code)
You can install it via NPM here. Please try it out and let me know what you think. I have big plans for it and want to add more advanced features soon, such as auto-tuning functions and measuring cold start performance, etc. If you have ideas for features then please let me know here.
NEW! A SAR app to auto-generate CloudWatch alarms!
I published a new SAR app called cloudwatch-alarms-macro to make it easy for you to create CloudWatch Alarms based on existing conventions.
This SAR app deploys a CloudFormation macro that can be used to auto-generate CloudWatch alarms for you. The macro does so based on the resources you have in a CloudFormation template and a pair of configurations you provide – one for region-wide defaults, and another for template-level overrides.
For now, the macro supports the following resources:
- Lambda: generates alarms for error rate, throttle count, DLQ error count and iterator age.
- SQS: generates an alarm for approximate message age so you know when you’re falling behind.
- API Gateway: generates alarms such as p90/p95/p99 latency, 4xx/5xx rate and 2xx rate.
- Step Functions: generates alarms for failed, throttled and timed out count.
I added support for the new Map state, so the plugin will generate the correct IAM permissions when you use the new Map state. Any functions you reference in the Iterator would be covered by the generated IAM role.
I specialise in rapidly transitioning teams to serverless and building production-ready services on AWS.
Are you struggling with serverless or need guidance on best practices? Do you want someone to review your architecture and help you avoid costly mistakes down the line? Whatever the case, I’m here to help.
Check out my new podcast Real-World Serverless where I talk with engineers who are building amazing things with serverless technologies and discuss the real-world use cases and challenges they face. If you’re interested in what people are actually doing with serverless and what it’s really like to be working with serverless day-to-day, then this is the podcast for you.
Check out my new course, Learn you some Lambda best practice for great good! In this course, you will learn best practices for working with AWS Lambda in terms of performance, cost, security, scalability, resilience and observability. We will also cover latest features from re:Invent 2019 such as Provisioned Concurrency and Lambda Destinations. Enrol now and start learning!
Check out my video course, Complete Guide to AWS Step Functions. In this course, we’ll cover everything you need to know to use AWS Step Functions service effectively. There is something for everyone from beginners to more advanced users looking for design patterns and best practices. Enrol now and start learning!
Are you working with Serverless and looking for expert training to level-up your skills? Or are you looking for a solid foundation to start from? Look no further, register for my Production-Ready Serverless workshop to learn how to build production-grade Serverless applications!
Here is a complete list of all my posts on serverless and AWS Lambda. In the meantime, here are a few of my most popular blog posts.
- Lambda optimization tip – enable HTTP keep-alive
- You are wrong about serverless and vendor lock-in
- You are thinking about serverless costs all wrong
- Just how expensive is the full AWS SDK?
- Many faced threats to Serverless security
- We can do better than percentile latencies
- Yubl’s road to Serverless
- AWS Lambda – should you have few monolithic functions or many single-purposed functions?
- AWS Lambda – compare coldstart time with different languages, memory and code sizes
- Guys, we’re doing pagination wrong
- Top 10 Serverless framework best practices