Weekly update 34

Yan Cui

I help clients go faster for less using serverless technologies.

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.

New posts

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.

AWS announcements

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.

serverless-step-functions plugin

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.


 

Whenever you’re ready, here are 4 ways I can help you:

  1. If you want a one-stop shop to help you quickly level up your serverless skills, you should check out my Production-Ready Serverless workshop. Over 20 AWS Heroes & Community Builders have passed through this workshop, plus 1000+ students from the likes of AWS, LEGO, Booking, HBO and Siemens.
  2. If you want to learn how to test serverless applications without all the pain and hassle, you should check out my latest course, Testing Serverless Architectures.
  3. If you’re a manager or founder and want to help your team move faster and build better software, then check out my consulting services.
  4. If you just want to hang out, talk serverless, or ask for help, then you should join my FREE Community.