All Posts

🚀 Project Update:

Data API Client: v1.1 Released

Bug fixes and feature updates including support for native JavaScript dates (thanks @cklam2), support for non-specific database queries, and deprecation of the HTTP keepAlive workaround in favor of the native SDK support. Read More...
Featured

Announcing the Serverless Reference Architectures Project

Serverless gives us the power to focus on delivering value to our customers without worrying about the maintenance and operations of the underlying compute resources. Cloud providers (like AWS), also give us a huge number of managed services that we can stitch together to create incredibly powerful, and massively scalable serverless microservices.

Almost 2 years ago now, I wrote a post on Serverless Microservice Patterns for AWS that became a popular reference for newbies and serverless veterans alike. The capabilities of serverless have changed dramatically since then, opening up a ton of new patterns and possibilities. Today I’m announcing the Serverless Reference Architectures Project. This project is intended to capture, share, explore, and debate the patterns and practices being used in serverless production applications today.

Continue Reading…

Featured

Takeaways from Programming AWS Lambda by Mike Roberts and John Chapin

Recently, Symphonia co-founders Mike Roberts and John Chapin wrote a book called Programming AWS Lambda: Build and Deploy Serverless Applications with Java. I personally abandoned Java long ago, but I knew full well that anything written by Mike and John was sure to be great. So despite the title (and my past war stories of working with Java), I picked up the book and gave it a read. I discovered that it’s not really a book about Java, but a book about building serverless applications with the examples in Java. Sure, there are a few very Java specific things (which every Java developer probably needs to read), but overall, this book offers some great insight into serverless from two experts in the field.

I had the chance to catch up with Mike on a recent episode of Serverless Chats. We discussed the book, how John and Mike got started with serverless (by building Java Lambda functions, of course), and what are some of the best practices people need to think about when building serverless applications. It was a great conversation (which you can watch/listen to here), but it was also jam packed with information, so I thought I’d highlight some of the important takeaways.

Continue Reading…

Featured

Making the Case for Serverless Use Cases

For quite some time, there was a running joke that “serverless” was just for converting images to thumbnails. That’s still a great use case for serverless, of course, but since AWS released Lambda in 2014, serverless has definitely come a long way. Even still, newcomers to the space often don’t realize just how many use cases there are for serverless. I spoke with Gareth McCumskey, a Solutions Architect at Serverless Inc, on a recent two part episode (part 1 and part 2) of Serverless Chats, and we discussed nine very applicable use cases that I thought I’d share with you here.

Continue Reading…

Featured

12 Important Lessons from The DynamoDB Book

Fellow serverless advocate, and AWS Data Hero, Alex DeBrie, recently released The DynamoDB Book, which ventures way beyond the basics of DynamoDB, but still offers an approachable and useful resource for developers of any experience level. I had the opportunity to read the book and then speak with Alex about it on Serverless Chats. We discussed several really important lessons from the book that every DynamoDB practitioner needs to know. Here are twelve of my favorites, in no particular order.

Continue Reading…

Featured

Takeaways from the State of Serverless Report

On a recent episode of Serverless Chats, I spoke with Stephen Pinkerton and Darcy Rayner of Datadog to dig into The State of Serverless report, which was released at the end of February 2020. After frequently fielding customer questions about the topic, Datadog looked at its data and customer use cases, and examined how they were using serverless. Datadog’s report is a way to break it all down, but it’s also an opportunity for its customers (and serverless users alike) to see how other people are using serverless in a data-driven way. I discussed methodology, findings, and key takeaways with Stephen and Darcy, and thought it’d be worthwhile to consolidate and share that insight.

Continue Reading…

🚀 Project Update:

Serverless MySQL: v1.5.4 released

This update includes a minor bug fix that automatically handles reconnections when receiving the occasional EPIPE error. Special thanks to @kernwig for the PR. Read More...
Featured

Verifying self-signed JSON Web Tokens (JWTs) with AWS HTTP APIs

“Trust no one.” Or at least that’s what Fox Mulder told me back in the 90s.

With the recent GA of HTTP APIs for API Gateway, I decided to start evaluating my existing API Gateway REST APIs to see if I could migrate them over to take advantage of the decreased latency and reduced cost of the new HTTP APIs. Several of them were disqualified because they utilize service integrations (a feature that AWS is working to add), but for one of my largest applications, the lack of Custom Authorizers is what brought me to a dead end. Or so I initially thought. 😉

After a bit of research (okay, it was actually several hours because I decided to read through a bunch of specs and blog posts and then run a ton of experiments), it turns out that hosting your own OIDC Conformant “server” to verify self-signed JSON Web Tokens with HTTP APIs is actually quite simple. So as long as you can use JWT for your bearer tokens, you can utilize your existing authentication service (and probably dramatically reduce your latency and cost).

In this post, I’ll show you everything you need to know to set this up yourself. We’ll generate certificates, create our OIDC discovery service, set up our HTTP API authorizers, generate and sign our JWTs, and protect routes with scopes.

Continue Reading…

🚀 Project Update:

Lambda API: v0.10.5 Released

Lambda API v0.10.5 has been released to fix a few minor bugs around ALB query string decoding and TypeScript definitions. Plus a new feature that allows you to disable error logging. Read More...
🚀 Project Update:

Data API Client: v1.0.1 Released

There was an issue with batch records via standard queries versus those wrapped in transactions. v1.0.1 includes a patch that checks the arguments and conditionally flattens the array for proper handling in each context. Read More...
Featured

Takeaways from AWS re:Invent 2019’s Amazon DynamoDB Deep Dive: Advanced Design Patterns (DAT403)

AWS re:Invent 2019 is a wrap, but now the real work begins! There are hundreds of session videos now available on YouTube. So when you have a few days (or weeks) of downtime, you can dig in to these amazing talks and learn about whatever AWS topics you fancy.

I was only able to attend a few talks this year, but one that I knew I couldn’t miss in person, was Rick Houlihan’s DAT403: Amazon DynamoDB deep dive: Advanced design patterns. At the last two re:Invents, he gave similar talks that explored how to use single-table designs in DynamoDB… and they blew my mind! 🤯 These videos were so mind-bending, that they inspired me to immerse myself in NoSQL design and write my How to switch from RDBMS to DynamoDB in 20 easy steps post. I was hoping to have a similar experience with this year’s edition, and I WAS NOT DISAPPOINTED.

As expected, it was a 60 minute firehose of #NoSQL knowledge bombs. There was A LOT to take away from this, so after the session, I wrote a Twitter thread that included some really interesting lessons that stuck out to me. The video has been posted, so definitely watch it (maybe like 10 times 🤷‍♂️), and use it to get started (or continue on) your DynamoDB journey.

Continue Reading…

Featured

Serverless Microservice Patterns for AWS

UPDATE: I’ve started the Serverless Reference Architectures Project that provides additional context and interactive architectures for some of theses patterns along with code examples to deploy them to AWS. Check it out.


I’m a huge fan of building microservices with serverless systems. Serverless gives us the power to focus on just the code and our data without worrying about the maintenance and configuration of the underlying compute resources. Cloud providers (like AWS), also give us a huge number of managed services that we can stitch together to create incredibly powerful, and massively scalable serverless microservices.

I’ve read a lot of posts that mention serverless microservices, but they often don’t go into much detail. I feel like that can leave people confused and make it harder for them to implement their own solutions. Since I work with serverless microservices all the time, I figured I’d compile a list of design patterns and how to implement them in AWS. I came up with 19 of them, though I’m sure there are plenty more.

In this post we’ll look at all 19 in detail so that you can use them as templates to start designing your own serverless microservices.

Audio Version:

Continue Reading…

Off-by-none: Issue #100

Celebrating 100 Issues! 🥳🥂

Welcome to issue #100! Thanks for being here! 🎉

Last week, we got a Q2 serverless recap, someone realized that NAT Gateways were expensive, and we learned how to model our serverless apps in a way that allows us to evolve them more easily.

This week, we’re celebrating the 100th issue of Off-by-none with what you’ve come to know, expect, and hopefully love: the many, many great serverless articles, projects, and tools from our community. But what’s more: I’m taking the time to reflect on the wonderful community we’ve built here, in your inbox, and sharing some ways I hope to improve your newsletter experience.

I’ve always wanted this newsletter to recognize the community’s vast and great work, and be inclusive and representative of those who are in it. I want you to feel like you’re a part of this newsletter and that you can see yourself in this community. To better accomplish that, I’m in the final stages of launching the new Off-by-none website. Though I’ve still got some work to do on it, it’s the vision of the site I am most excited about. I hope that it will be a place where I can facilitate more engagement, invite more submissions, ideas, and stars, and better amplify the many voices that make this community so great. If you have any suggestions, as always, please feel free to let me know, as I want the Off-by-none site to truly be a place for all of us. 🙌

Serverless News & Announcements 📣

TriggerMesh helps you do more with serverless
Connect GitLab with Confluent and Zendesk, or connect these and dozens of other apps with AWS services like Kinesis, SQS, SNS, and Cognito. Even integrate with EventBridge. Join the Beta program today! Sponsored

Cloudflare launches Workers Unbound, the next evolution of its serverless platform
Oh wow, this looks amazing. Workers Unbound is meant for more complex and longer-running processes and operates at a fraction of the cost of Lambda, Azure Functions, and Google Cloud Function.

The AWS Serverless Application Model CLI is now generally available
In case you don’t know, the AWS SAM CLI is the command line tool companion for AWS SAM templates. It provides developers local tooling to create, develop, debug, and deploy serverless applications, and now it’s finally GA.

The Node.js Runtime
FYI, Google Cloud Functions now support Node.js 12 (in beta). I’d love to see Google become more competitive with some of their serverless offerings. Node 12 was released over a year ago.

Epsagon Further Accelerates Growth with New Investment from DTCP
Congrats to the team over at Epsagon! This latest investment brings their total funding to $30M which will help them increase their team to service their growing customer base. Apparently observability in the cloud is getting very popular.

Serverless Stories 📖

We went serverless with our new startup. And you should (probably) too.
I totally agree. Ankit explains why he chose serverless and what some of the benefits are. He gives some reasons when not to go serverless, but I think we’ve addressed those objections many times over.

A Plumber’s Guide to Cloud
Great post by Daniel Singletary, who took his experience as a plumber and applied the same troubleshooting methodology to complete Forrest Brazeal’s “Cloud Resume Challenge”.

A micro API in Firebase and Cloudflare Workers
This was a fun little experiment by Braeden Smith that compared building a simple micro API for loading an image in both Firebase and Cloudflare Workers. Fun Fact: Cloudflare won.

Serverless Use Cases 🗺

Serverless magic links with AWS Cognito
Here’s a really interesting use case for serverless that takes advantage of Cognito’s multi-factor login support to allow for temporary “magic links”. Thomas Schoffelen explains how secure it is, how it scales, and provides some code for a proof of concept.

Functions as a Service — A simple use case
Need to catch a webhook and publish a message to the Slack API? Pavel Pratyush explains why serverless is the perfect solution for this simple use case.

Processing PGP Encrypted Data in AWS Lambda using Python.
Here’s an interesting serverless use case. Mayank Madhukar shows you how to use python-gnupg to decrypt emails from an S3 bucket using Lambda.

Serverless Concepts 🏗

Monitor & Debug Serverless with 30-Second Auto-Instrumentation
Complete observability over your serverless environment with no code changes required. With one-click distributed tracing, Lumigo lets you effortlessly find & fix issues in serverless and microservices environments. Get serverless-specific smart alerts before they impact performance or cost. Sign up for a free account and get up & running in minutes. Sponsored

Real-time Data Processing With Kinesis Data Analytics
Nick Van Hoof and David Smits put together an excellent post that shows the serverless architecture they use to track, analyze and alert on traffic jams in Belgium using (near) real-time analytics processing. Very cool stuff.

Breaking Down Serverless Anti-Patterns
Parts of this post by Sarjeel Yusuf are a bit hard to follow, but the overall point should be well taken. We have to think and operate differently when building serverless applications, and in many circumstances, best practices are still a moving target.

Connecting Accounts with AWS Event Bridge
I like John Gilbert’s overall approach here, especially separating subsystems at the AWS account level to create bulkheads to contain the blast radius. I’m curious if there might be an alternative approach that doesn’t require upstream subsystems to know about other subsystems? Perhaps creating a common bus in a separate account that all subsystems can push to and read from?

Five Reasons You Should Consider AppSync Over API Gateway
Excellent breakdown by Yan Cui that outlines and explains five really good reasons to give AppSync another look.

Replacing web server functionality with serverless services
Another great post by James Beswick that explains how to significantly reduce your infrastructure requirements, setup time, and maintenance needs by switching to a serverless approach. Getting all that scalability and multi-AZ redundancy right out of the box should make the choice simple.

Serverless Tutorials 👷‍♀️

Implementing a Serverless Speech-To-Speech Language Translation App
Andre Beck started a series of articles that aim to illustrate the implementation of simple cloud apps on serverless platforms. First up is a language translation app that uses Step Functions.

How to handle duplicate Lambda invocations
Important message from Murali Allada about idempotent operations when dealing with asynchronous Lambda invocations. He suggests using DynamoDB, which makes a lot of sense, but you should also determine whether mitigating the side effects is worth the extra effort.

AWS CI/CD Pipeline Tools: CodeBuild and CodePipeline
Ran Ribenzaft walks you through setting up a CI/CD pipeline for a serverless project using CodeBuild and CodePipeline.

Creating an AWS SAM CLI project with Typescript and Both Types of Layers (Dependencies and Function)
Thinking about building a serverless Typescript project using AWS SAM? Nick Bordeau has you covered, complete with his project boilerplate.

Serverless Security 🔒

Twilio: Someone broke into our unsecured AWS S3 silo, added ‘non-malicious’ code to our JavaScript SDK
Note to self: Don’t enable S3 access policies that leave SDKs readable and writable by anyone. Otherwise, automated cyber-crime campaigns that prey on JavaScript code might infect said SDKs and take you over 8 hours to realize it.

Serverless Reads 🤓

Liberty IT Adopts Serverless Best Practices Using AWS Cloud Development Kit
Andrew Robinson wrote up a great piece (with the help of Matthew Coulter) on how Liberty IT is using the AWS CDK along with a number of best practices to create secure, repeatable deployments for their services. Nice mention of the CDK Patterns site as well.

Serverless for Enterprise: Scale big or go home
Using serverless for greenfield applications should be a no brainer at this point, but for enterprises with existing workloads, the choice isn’t always as clear. Mariliis Retter offers a few things enterprises should be keeping in mind as they start to make the transition.

What comes after Kubernetes?
I once knew an Ops person who said his primary role was to automate himself out of a job. And that’s what cloud providers are doing with K8s IMO. There are a lot more interesting things to be built on the infrastructure than there is to be done to the infrastructure. It’s just a matter of time until Kubernetes will be given as much thought as the hypervisor or Firecracker.

The Edge Computing Opportunity: It’s Not What You Think
Matthew Prince goes into detail about the future of Edge Computing and how Cloudflare Workers are addressing things like speed, cost, and most importantly, compliance.

Serverless or Kubernetes: When do you use which?
Pradeep Kumar lays out a number of rational arguments as to why you’d choose one over the other. I still think the choice isn’t just between FaaS and containers, though. There are so many other serverless “services” available, that trying to implement any of these on K8s would seem like a colossal waste of time and resources.

Videos, Podcasts, and more… 📽

Free 50-Minute Learning Path: How to Use Objects in Amazon S3 to Trigger Automated Workflows Using AWS Lambda
From the same author that brought you the episodic Innovator Island virtual workshop, this 6-episode learning series shows you how to use the S3 and Lambda pattern through several example applications. You’ll deploy applications into your own AWS account, explore extending them to your own use-cases, and ultimately be ready to develop sophisticated distributed applications built around S3 events using custom code to integrate with other AWS services. Sponsored

Episode #59: Going Green with Serverless with Paul Johnston (Part 1)
In part 1 of this two-part episode, I chat with Paul Johnston about how serverless compares to traditional computing in terms of being “green”, the impact of data centers on climate, why efficiency is only a first step, what people in tech can do to affect change, and so much more. Watch on YouTube.

ServerlessDays Virtual – July 2020
The second edition of ServerlessDays Virtual happened live last night! The replay is available now, so make sure you check out the amazing talks by Adrian Cockroft, Linda Nichols, Rusthem Feyzkhanov, Rich Buggy, Will Velida and Dr. Denis Bauer.

The Talking Serverless Podcast #19
I had a great time being a guest on The Talking Serverless Podcast with Ryan Jones. He’s had a lot of amazing guests, so you should check out the archives and give the show a listen.

Real World Serverless #21: From K8 to Serverless at Wealth Wizards
Yan Cui talks with Ionut Craciunescu from Wealth Wizards and discusses why their team decided to move away from Kubernetes and adopt a more serverless approach.

Simplest Serverless App with AWS CDK (API Gateway, AWS Lambda and DynamoDB)
Marcia Villalba give us an introduction to the AWS CDK and shows us how to deploy a simple serverless stack that creates an API route, a Lambda function, and a DynamoDB Table.

New from AWS 🆕

Amazon CloudFront adds additional geolocation headers for more granular geotargeting
This is an awesome update. You can now access a visitor’s city, state, and zip code, plus their timezone and approximate latitude and longitude. Lots of cool personalization that can be done with this

Amazon Elastic File System increases per-client throughput by 100%
Starting to play around with EFS and Lambda? Well, Amazon EFS now supports up to 500 MB/s of per-client throughput, a 100% increase from the previous limit of 250 MB/s.

AWS CodeBuild now supports accessing Build Environments with AWS Session Manager
Great feature if you need to dig in to diagnose complex build problems. Since you should be using CI/CD for all your production workloads anyway, this could become a handy tool.

Amazon Elasticsearch Services announces support for Elasticsearch versions 7.7
Nope, still not serverless, but new features are always welcome.

Amazon CloudFront announces Cache Key and Origin Request Policies
Another very cool update to CloudFront. You now have more control over your cache keys, and can even forward varying information to your origin, but still used the same cached content if necessary. Very cool.

Announcing AWS Serverless Application Model (SAM) CLI now generally available for production use
We already mentioned this at the beginning, but here is the official “what’s new” announcement. Good stuff from the SAM team.

Amazon Lightsail now offers CDN distributions to accelerate content delivery
This is an interesting way to take your “not-so-serverless” application and add a bit of serverless to it. Adding a CDN to cache assets and pages automatically is at least a good first step.

Serverless Jobs 👩‍💻 Sponsored

Serverless Engineer – stedi.com
At Stedi, we’re working in one of the biggest markets on the planet – EDI, the technological backbone of the physical product economy. We’re building a next-generation platform: a ubiquitous commercial trading network to automate the trillions of dollars in B2B transactions exchanged by nearly every company on Earth. If you’re interested in what we’re building and how we’re building it, we’d love to hear from you.

Have a job listing you’d like to share? Please contact me for more information. 

Upcoming Serverless Events 🗓

There are a lot of upcoming serverless events, webinars, livestreams, and more. If you have an event you’d like me to mention, please email me.

July 29, 2020 – Orchestrating Distributed Business Workflows with AWS Step Functions

July 30, 2020 – Building Intelligent Application Flows in the Cloud and On-premises with TriggerMesh (Webinar)

September 3, 2020 – ServerlessDays Warsaw

October 1-2, 2020 – ServerlessDays Hamburg 2019

Serverless Star of the Week ⭐️

Each week, I fill this spot with people who are helping to grow the serverless community with their work. With people in every corner of the globe making great contributions, I unfortunately and inevitably cannot know them all. That’s why I am asking for your help in ensuring we amplify the accomplishments of our friends and colleagues through my new Serverless Star nomination form. These are the people on your team, in your circle, who are grinding out new projects, ideas, and perspectives that can make a difference in the serverless community. In honor of our 100th issue, let’s take this step to elevate their voices, and recognize their contributions together. You can start by nominating someone here.

Final Thoughts 🤔

Wow. 100 issues! I’ve learned so much over the last two years from reading all the amazing content that this community has created, and I hope you have too. Thank you all for continuing to be a part of this.

Like I mentioned in the beginning, the new site should be available soon, and I hope it will give the community more ways to contribute, learn, and amplify the voices of our members.

I hope you enjoyed this newsletter. We’re always looking for ideas and feedback to make it better and more inclusive, so please feel free to reach out to me via Twitter, LinkedIn, Facebook, or email.

Cheers,
Jeremy

P.S. If you like this newsletter, and think others would too, please do me the honor of sharing it with friends and coworkers who are interested in serverless.

The Storage First Pattern

The Storage First Pattern allows you to reliably capture data from incoming API requests without needing a Lambda function to parse, process, transform and save the data. Under the right circumstances, this pattern can reduce latency, save money, and minimize bugs.

Interactive Reference Architecture

Click on the components or numbered steps below to explore how this architecture works.

The Storage First pattern is useful when your application doesn’t require a lot of data transformation on incoming API requests. Rather than attaching API Gateway to a Lambda function that has to parse, process, transform, and save data, we can bypass the Lambda function by using a “service integration” that will send the data directly to an AWS service, like SQS. This reduces the latency of our API calls, saves money by removing the need to run a processing Lambda function, and makes our application more reliable because we are not introducing additional code.

In our example above, we’re using an SQS queue and then processing data off of that using a Lambda function subscription. There are plenty of other services that can be written to directly including DynamoDB, Kinesis, and EventBridge. To the best of my knowledge, Eric Johnson from AWS coined the term “Storage First” to indicate that we want to ensure that we save a user’s raw data before we attempt to run any processing on it. That way, if downstream services or processing fails, we always have a copy of the original request. He explains the process in his post Building a serverless URL shortener app without AWS Lambda.

The incoming data can be transformed and verified using VTL templates, but the more complexity you introduce, the more likely you are to create issues with edge cases. This is an incredibly useful pattern for high velocity workloads like webhooks and clickstream data because it provides low latency and high reliability. Additional processing can be done asynchronously, allowing you to add resiliency to your application if downstream systems are unavailable.

Deploy this Pattern

Below are the basic configurations for deploying this pattern using different frameworks and platforms. Additional configuration for your environment will be necessary. The source files and additional examples are available in the GitHub repo.

  • TO IMPLEMENT

The Circuit Breaker

The Circuit Breaker pattern keeps track of the number of failed (or slow) API calls by using a cache to share the status across multiple Lambda functions. This allows you to perform load shedding when downstream services become unavailable.

Interactive Reference Architecture

Click on the components or numbered steps below to explore how this architecture works.

The Circuit Breaker pattern keeps track of the number of failed (or slow) API calls by using a cache to share the status across multiple Lambda functions. In this example, we’re using a DynamoDB table so that we can avoid using a VPC. If you were in a VPC already, ElastiCache would be a good alternative.

Here’s how it works. When the number of failures reaches a certain threshold, we “open” the circuit and send errors back to the calling client immediately without even trying to call the API. After a short period of time, we “half open” the circuit, sending just a few requests through to see if the API is finally responding correctly. All other requests receive an error. If the sample requests are successful, we “close” the circuit and start letting all traffic through. However, if some or all of those requests fail, the circuit stays “open”, and the process repeats with some algorithm for increasing the timeout between “half open” retry attempts.

This is an incredibly powerful (and cost saving) pattern for any type of synchronous request to an API or downstream system. You are accumulating charges whenever a Lambda function is running and waiting for another task to complete. Allowing your systems to self-identify issues like this, provide incremental backoff, and then self-heal when the service comes back online, adds a tremendous amount of resiliency to your applications.

Deploy this Pattern

Below are the basic configurations for deploying this pattern using different frameworks and platforms. Additional configuration for your environment will be necessary. The source files and additional examples are available in the GitHub repo.

Off-by-none: Issue #99

Modeling business logic flows in serverless applications… 📈

Welcome to Issue #99 of Off-by-none. Thanks for joining us!

Last week, we got more CDK patterns to explore, another reason to look at BigQuery, and some updated serverless best practices. This week, we get a Q2 serverless recap, someone realizes that NAT Gateways are expensive, and we learn how to model our apps for simpler evolutions. Plus, we’ve got some amazing posts from the serverless community.

Serverless News & Announcements 📣

TriggerMesh helps you do more with serverless
Connect GitLab with Confluent and Zendesk, or connect these and dozens of other apps with AWS services like Kinesis, SQS, SNS, and Cognito. Even integrate with EventBridge. Join the Beta program today! Sponsored

ICYMI: Serverless Q2 2020
The Serverless Team at AWS has wrapped up all of the Q2 serverless announcements, blog posts, videos and more into a nice little package for you. Lots of stuff happened, so set aside a few hours if you click this link!

Epsagon Introduces Fastly Technology Integration
Pay attention to Fastly. Oh, and by the way, Epsagon now supports tracing their requests from the edge.

MIT Spinoff Data Management Company TileDB Closes $15 Million
“With a totally serverless infrastructure, TileDB delivers access control and enables distributed computing at extreme scale, eliminating all cluster management and minimizing TCO.” Hmm, a universal data engine that can access, analyze, and share complex data sets with any tool at planet scale? Very, very interesting. 🤔

Begin supports renaming default GitHub branches
I’ve seen a lot of people rightfully question some of the naming conventions we use in tech, but Begin actually did something about it. Now you no longer need to use the master branch, but can rename it to something else and still have their system pick it up.

Serverless Stories 📖

A 1 year review of Laravel Vapor
This is an excellent post by Jack Ellis that not only recounts his team’s use of Laravel Vapor, but offers some great insights into the benefits (and constraints) of serverless. For those of you toiling with servers to run your Laravel applications, this glowing endorsement of Vapor might be just what you’re looking for.

Lessons in Serverless Tech. 1 – NAT GW is expensive.
Yup. I might even go as far as saying it’s too expensive. If you are trying to optimize your serverless application costs, think long and hard about whether you need both VPC and Internet access from the same Lambda function. Audrius Kucinskas clearly agrees with me.

El Chapo: an open source & serverless URL shortener written in python/flask
Here is an interesting post by Sankalp Jonna that highlights one of the core tenets of serverless development: build vs. buy. In order to save $30/mth on a prebuilt solution, his team spent a day building their own, and now it costs only $5/mth to run it. I probably would have built my own solution as well, but I have to think the $25/mth cost savings wouldn’t outweigh the cost of development. 🤷‍♂️

Serverless Use Cases 🗺

What scenarios are appropriate for serverless?
“Serverless computing is best-used for tasks that don’t block the user interface.” 🤦‍♂️ Please, please, please stop saying things like this. Either the author has never run a serverless application at scale, or didn’t take the time to learn how to optimize it. According to the results of the Serverless Community Survey, 75% of respondents are using serverless for REST APIs. So, yes, this is a perfectly appropriate scenario for it!

How I Built a REST API Using Google Sheets
I think there are much easier ways to accomplish this without needing to use Cloud Run, but the use case still stands. Google Sheets works great for a number of things, and being able to pull or push data to it from an API can make a lot sense in the right scenario.

5 Popular Use Cases for Going Serverless
Mariliis Retter offers up five use cases for serverless. We’ve covered these in depth before, but it never hurts to get a good reminder now and then.

Serverless Concepts 🏗

Scale and Resilience Aren’t Just Buzzwords
So this isn’t specifically about serverless, and I have a feeling this series is going to eventually go down the Kubernetes route, but Stephanie Wong lays out some very good principles here, and more importantly, adds helpful context to the terms “scale” and “resilience”. I know I’ve seen “but will it scale?” become a party joke, but for modern application developers, it needs to be the cornerstone of your architecture.

Using the AWS Serverless Application Model (SAM)
Great post by Andrew May that compares and contrasts SAM and the Serverless Framework. He points out a lot of the limitations faced by SAM, but I often find myself working around limitations in the Serverless Framework as well. If you’re trying to choose between the two, this post will give you some good insights.

TypeScript and Netlify Functions
The more you know. Alex Chiu reminds us that Netlify just uses AWS Lambda functions, and can therefore utilize the @types/aws-lambda type definitions for event object autocompletion.

6 things you didn’t know you could do with the Twilio Serverless Toolkit
I really love this model that allows you to develop serverless functions on the SaaS platforms you’re using. In this post, Phil Nash highlights a few features of the Twilio Serverless Toolkit.

Serverless Tutorials 👷‍♀️

Free 50-Minute Learning Path: How to Use Objects in Amazon S3 to Trigger Automated Workflows Using AWS Lambda
From the same author that brought you the episodic Innovator Island virtual workshop, this 6-episode learning series shows you how to use the S3 and Lambda pattern through several example applications. You’ll deploy applications into your own AWS account, explore extending them to your own use-cases, and ultimately be ready to develop sophisticated distributed applications built around S3 events using custom code to integrate with other AWS services. Sponsored

Crash Course on AWS CDK and Serverless with REST API and Data Lake Analytical Querying
If you’re looking to get started with the AWS CDK, this might be a good place to start. Simple, straightforward tutorial by Renato Byrro that walks you step by step through the basics and then right into a working example.

Vue Serverless Side Rendering with AWS Lambda@Edge
David Porter has some code and explanations that will let you perform SSR with Vue apps on Lambda@Edge. Lots of good reasons to do this, which David points out in the post.

AppSync: how to inject table names into DynamoDB batch & transact operations
Yan Cui has a quick fix for those of you using dynamic table names for DynamoDB and are required to pass it into your AppSync resolvers. Really interesting approach, but he says this could be better encapsulated as part of the serverless-appsync-plugin. So if you have some free time, maybe add a PR. 😀

How to structure GraphQL and Typescript app using Serverless infrastructure
Here’s a tutorial from Mirco Guidetti that uses the apollo-server-lambda npm package to turn Lambda into a GraphQL server. Should you use AppSync instead? Maybe, but I’ve seen people having success with this approach.

Serverless end-to-end tracing, troubleshooting & performance monitoring with Lumigo
Mohammed Izzy provides a good overview of Lumigo and how their tracing features and console allow you to quickly debug your serverless applications. There are a lot of good tools out there for adding observability to your serverless applications, and at this point, you probably can’t go wrong choosing any of them.

Serverless Security 🔒

Protecting Your Serverless Solution
This article by Sat Gainda gives a pretty good overview of all the things to think about when it comes to securing your serverless application, along with some other things to think about (like cost). The section on serverless development was a bit confusing (modern approaches use IaC, not containers), but otherwise, some really great info in here.

Serverless Reads 🤓

Monitor & Debug Serverless with 30-Second Auto-Instrumentation
Complete observability over your serverless environment with no code changes required. With one-click distributed tracing, Lumigo lets you effortlessly find & fix issues in serverless and microservices environments. Get serverless-specific smart alerts before they impact performance or cost. Sign up for a free account and get up & running in minutes. Sponsored

Modeling business logic flows in serverless applications
I really enjoyed this piece by James Beswick that walks you through the evolution of a serverless application as business requirements change. My evolutions have never been quite as smooth and straightforward as the example James gives, but the point is well taken. Designing serverless applications in small, single-purpose, discrete actions, certainly does make iteration much easier.

Building Well-Architected Serverless Applications with Thundra (3-part series)
This three-part series is vendor specific to Thundra, but Emrah Samdam does an excellent job taking you through the Well-Architected Serverless Lens and addressing the questions that every developer should be asking when building a serverless app.

AWS Serverless: you might not need third party monitoring
This is a really interesting post by Rehan van der Merwe that highlights all of the powerful monitoring, logging, and tracing features provided by AWS for your serverless applications. Here’s the problem, the complexity of setting all of these components up (and getting everything configured correctly) is still a massive exercise in patience. For smaller projects, I will typically rely on the built-in AWS services, but for critical applications, third-party services give you what you need out-of-the-box, with minimal setup.

Grow, not build, your serverless team!
If Sheen Brisals can’t inspire you to go serverless, then no one can! In his latest post, he outlines a number of stages for growing a serverless team from with your organization, culminating in an agile and efficient culture with highly-accelerated development processes.

The exotic mixture of Enterprise and Serverless
This is an entertaining read by Pang Bian that juxtaposes the multiple layers of corporate bureaucracy with the novelty of serverless in the enterprise he works for. I’m still not sure how they seem to make it work, but good for them for trying.

For the serverless (non)commuter… 🚎

Episode #58: Observing Serverless Observability with Erica Windisch
In this episode, I chat with Erica Windisch about the challenges with monitoring and troubleshooting serverless applications, why observability is so important with serverless, what advancements have been made over the last year, and so much more. Watch on YouTube.

New from AWS 🆕

Announcing automatic backups for Amazon Elastic File System
It would be amazing if AWS would do more things like this. Under what circumstances would you not want your file system backed up? There might be a few, but things like this make more sense as an opt out.

New classroom course: AWS Cloud Financial Management for Builders
Interesting course from AWS that says it’ll teach how to design “cost-optimized” architectures. The syllabus seems quite solid, and just might give you some Corey Quinn level skills (without all the snark of course 😉).

Amazon CloudFront announces new TLS1.2 security policy for viewer connections
Improvements to the SSL/TLS protocols are always good to see.

Announcing CDK Pipelines Preview, continuous delivery for AWS CDK applications
Two things you need to know about this. One, CDK Pipelines are self-mutating, meaning they automatically update themselves when you add new applications or stages, and two, they seem pretty amazing.

Introducing Amazon Interactive Video Service (Amazon IVS)
I have no idea how good (or pricey) this is, but under the right circumstances, hosting your own live broadcasts does sound amazing. There are plenty of streaming platforms out there, but to be able to “own your audience” is an interesting value prop.

New Amazon Elastic File System console simplifies file system creation and management
Again, I like these moves by AWS to simplify the user experience. Not known for their console UX, seeing these strides gives me hope for the future.

Amazon SQS Now Supports New Console Experience
Not to keep harping on this, but these upgrades are very welcome. Now, granted, most of this stuff should be managed with IaC, but being able to poke around and easily look at configurations is a handy feature.

Introducing the Cloud Development Kit for Terraform (Preview)
cdktf lets you define application infrastructure with familiar programming languages, while leveraging the hundreds of providers and thousands of module definitions provided by Terraform and the Terraform community. Hey, if this is your thing, go for it.

Serverless Jobs 👩‍💻 Sponsored

Serverless Engineer – stedi.com
At Stedi, we’re working in one of the biggest markets on the planet – EDI, the technological backbone of the physical product economy. We’re building a next-generation platform: a ubiquitous commercial trading network to automate the trillions of dollars in B2B transactions exchanged by nearly every company on Earth. If you’re interested in what we’re building and how we’re building it, we’d love to hear from you.

Have a job listing you’d like to share? Please contact me for more information. 

Upcoming Serverless Events 🗓

There are a lot of upcoming serverless events, webinars, livestreams, and more. If you have an event you’d like me to mention, please email me.

Featured Event
July 28th, 2020 – CloudZero presents How We Built a Serverless Machine Learning Pipeline for Under $7/Day with Adam Tankanow (Webinar)

July 22, 2020 – Serverless 201: Advanced Development and Monitoring with AWS, Stackery, and Lumigo

July 22, 2020 – Predicting and Managing Costs in Serverless Applications with AWS

July 27/28, 2020 – ServerlessDays Virtual

July 28, 2020 – Hosting Without Hoisting: NPM Flattening for Zero Cold Start Serverless (Online Meetup)

July 29, 2020 – Orchestrating Distributed Business Workflows with AWS Step Functions

July 30, 2020 – Building Intelligent Application Flows in the Cloud and On-premises with TriggerMesh (Webinar)

September 3, 2020 – ServerlessDays Warsaw

October 1-2, 2020 – ServerlessDays Hamburg 2019

Serverless Star of the Week ⭐️

There is a very long list of people that are doing #ServerlessGood and contributing to the Serverless community. These people deserve recognition for their efforts. So each week, I will mention someone whose recent contribution really stood out to me. I love meeting new people, so if you know someone who deserves recognition, please let me know.

This week’s star is Alex Wood (@alexwwood). Alex is currently a Senior Software Engineer at AWS developing open source serverless tools. Before that, Alex was the lead developer on the AWS Ruby SDK and is the author of the AWS Lambda Ruby runtime. He’s spoken about writing Lambda functions as idiomatic Ruby code and running them on AWS for the Ruby on Rails podcast, and also had a re:Invent 2019 session, speaking about AWS SAM and the AWS SAM CLI. Thank you, Alex, for your incredible work – and sharing it with others! 🙌

Final Thoughts 🤔

Another busy week for serverless, and it’s super exciting to see some additional serverless events starting to pop up.

And speaking of super exciting, next week the Off-by-none newsletter celebrates 100 issues! It seems a bit crazy to think about how many amazing serverless stories, use cases, tutorials, and more have been shared over the last two years. I’m planning something kinda big for next week, so I hope you’ll share this with your friends and coworkers so they don’t miss it!

I hope you enjoyed this newsletter. We’re always looking for ideas and feedback to make it better and more inclusive, so please feel free to reach out to me via Twitter, LinkedIn, Facebook, or email.

See you next week,
Jeremy

P.S. If you like this newsletter, and think others would too, please do me the honor of sharing it with friends and coworkers who are interested in serverless.

Off-by-none: Issue #98

More serverless CDK Patterns for you to explore… 🕵️‍♀️

Welcome to Issue #98 of Off-by-none. I’m glad you could join us!

Last week, we announced a new way to explore serverless architectures, learned how to debug and load test serverless applications, and we finally got “connection pools” from Lambda. This week, we get more CDK patterns to explore, yet another reason to look at BigQuery, and some updated serverless best practices. Plus, we have plenty of great content from the serverless community.

Serverless News & Announcements 📣

Webinar: Would you like to connect applications like GitLab, Confluent, Zendesk, AWS services together?
You can, using TriggerMesh Bridges which allows you to build intelligent application flows using any service, running in the cloud or on-premises. Join us July 30 to see how easy TriggerMesh makes it connect application flows! Sponsored

Announcing the FaunaDB Data Manager
The FaunaDB Data Manager (FDM) can assist with a variety of import and export tasks, including copying documents, collections, indexes, functions, and roles from one FaunaDB database, at any particular point in time, to another FaunaDB database, plus a variety of useful data features. It’s still in preview mode, but looks like a useful tool for FaunaDB customers.

Google Cloud announces BigQuery Omni multicloud analytics solution
So this sounds way too good to be true, but if I can actually query my AWS data using BigQuery without worrying about data transfer costs or duplicating data, that’s pretty amazing. This could be a game changer.

Serverless Spotlight – Sign up to be a guest
I’m launching a new web series called Serverless Spotlight that will “Shine a light on the people who make serverless awesome!” The episodes are 5-10 minutes, and will feature people like you sharing what they are working on in serverless. Commercial, open source, blog post, whatever, we want to hear from you. Be sure to sign up to be a guest.

AWS Serverless Customer Success
Not convinced that serverless is ready for primetime? These customer success stories should help change your mind. AWS recently launched a “Serverless Customer Success” page that highlights a series of case studies that show the positive impact of serverless on companies ranging from startups to enterprises.

Serverless Stories 📖

How I Built a Serverless AWS Lambda Twitter Bot in NodeJS in a Single Day
Spencer Pollock walks through his journey building a Twitter Bot using AWS Lambda. It’s fun following someone’s thought process like this. I would use Parameter Store for my Twitter credentials instead of storing them in a file that’ll likely get checked into git, but for a quick and dirty first go, it’ll do.

The Cloud Resume Challenge, or How I Learned to Stop Worrying and Love the Cloud
Kudos again to Forrest Brazeal for starting the Cloud Resume Challenge. There are several people writing about their experiences, but I found this one from Antonio Lo Fiego to be incredibly enlightening. He doesn’t seem to agree that “… the latest version [of the] SAM CLI makes serverless development easier for developers.” His well-placed JT GIF perfectly encapsulates the way many people new to serverless feel.

How I built a zero cost serverless scraper
Anshaj Khare explains how he built a Twitter scraper using cloud native GCP tools. This post makes me wonder about the differences in the developer experience between GCP and other clouds.

Serverless Use Cases 🗺

Convert HTML to Markdown with a serverless function
Michael Vigor outlines a simple use case that I certainly wouldn’t want to set up and maintain a server for. I love little one-off services like these that are easy to build with FaaS, and enable developers to build things quickly without all the red tape.

A rock-paper-scissors app with gesture detection and voice
Who would have thought of serverless Rochambeau? The cloud advocates at Microsoft, that’s who. This uses a bunch of Azure native services (not 100% serverless), but still a pretty interesting application of the technologies.

How We Automatically Create And Delete Environments For Developers
Gavin Cornwell has written before about automation using Step Functions, but in this post he shows how his team creates an environment when feature branches are created, and then deletes the environment when the branch is removed.

Serverless Concepts 🏗

CDK Patterns at 20! Let’s Walk Through all 20 Serverless Patterns for AWS
Matt Coulter has done an amazing job on the CDK Patterns site and repository and has consolidated all 20 patterns into a comprehensive blog post. There are so many amazing ideas to explore with this, so make sure you check it out.

AWS Serverless Application Lens — A Summary
Amulya Rattan Bhatia attempts to summarize the Well-Architected Serverless Application Lens whitepaper. It’s a much shorter read and does a good job covering the most important points. If you don’t have time to read the whitepaper, this should at least get you headed in the right direction.

Are Lambda-to-Lambda calls really so bad?
This recent post by Yan Cui started a bit of a debate on Twitter regarding his recommendation to put an API Gateway in between inter-service, synchronous calls that ultimately map to a Lambda function. I’m personally a big fan of using synchronous Lambda-to-Lambda calls using the SDK (when appropriate) to reduce overhead and complexity, but Yan makes a lot of really good points why not to do this. Serverless best practices are constantly evolving, so you’d be wise to follow this debate.

Lambda Execution Leaks: A Practical Guide
Dori Aviram points out the problem when unresolved promises leak into your Node-based Lambda functions. This is probably more common than you think, and can be a massive pain to debug. This post outlines what can cause this issue and some ways to mitigate it.

Serverless Tutorials 👷‍♀️

Monitor & Debug Serverless with 30-Second Auto-Instrumentation
Complete observability over your serverless environment with no code changes required. With one-click distributed tracing, Lumigo lets you effortlessly find & fix issues in serverless and microservices environments. Get serverless-specific smart alerts before they impact performance or cost. Sign up for a free account and get up & running in minutes. Sponsored

The Serverless LAMP stack part 3: Replacing the web server
Benjamin Smith and Matthieu Napoli (the creator of Bref) show you how to build serverless PHP applications without needing a web server. Matthieu also explains how the implementation of FastCGI Process Manager inside of Lambda helps makes this possible.

Integrating Amazon EventBridge and Amazon ECS
Jakub Narloch shows you how the new EventBridge to API Gateway target enables new use cases. Even if ECS isn’t your thing, you can use this to route events to webhook consumers, map inter-service communication contracts, and even handle complex integration tests.

Get More Out Of Lambda Authorizers- Use Response Context
Adrin Mukherjee outlines a scenario that uses custom authorizers to pass additional context into your Lambda functions that can be used for calls to downstream services. It’s a powerful pattern, and with the integration into Secrets Manager, you can apply a lot of security best practices, including automatic credential rotation.

Creating low-latency, high-volume APIs with Provisioned Concurrency
Even though James Beswick craps on my Lambda Warmer project (😂 totally kidding, I don’t actually use it anymore), he does a great job explaining how Provisioned Concurrency can ensure predictable start-up times to latency-sensitive Lambda functions. And if your workload really needs this, a 75% reduction in your slowest execution times is a compelling reason to spend the extra money.

Explore Serverless On Alibaba Cloud With SLS Framework
Thinking about going serverless on the Alibaba cloud? The Serverless Framework has got you covered, and the Serverless Guru team has provided us with this straightforward tutorial to get you started.

Multipart uploads with S3 pre-signed URLs
Great tutorial by Shahar Yakov that walks you through the detailed steps of initiating a multipart upload to S3, generating pre-signed URLs for all the parts, and then stitching them all back together to complete the process.

Serverless Reads 🤓

Serverless: a backend thing that gives superpowers to frontend developers
Another fun post by Slobodan Stojanović that explains how serverless can give frontend developers the power to make their applications more interactive and highly scalable using modern techniques, rather than relying on traditional servers.

Why we didn’t choose QLDB for a healthcare app
Yan Cui has a great article that simply points out the pros and cons of Amazon’s Quantum Ledger Database, and explains why his client decided it wasn’t quite ready for their application.

How to pick the right Compute Savings Plan for Serverless Workloads on AWS
If you’re interested in saving some money on your AWS serverless workloads (and who doesn’t like saving money?), they check out this post by Michael Bahr that outlines how Compute Savings Plans work, and when they might be right for you.

How to design Serverless Apps like a Pro using *Interactive* Serverless Reference Architectures 🚀🔥
Farrah Campbell wrote up a piece on the Serverless Reference Architecture project (which she and Stackery were instrumental in getting off the ground). We’re working on more patterns and content, so stay tuned for more serverless!

For the commuter… 🚎

Episode #57: Building Serverless Applications using Webiny with Sven Al Hamad
In this episode, I chat with Sven Al Hamad about how Webiny makes building serverless applications easier, why everyone from small startups to large enterprises should be choosing serverless, whether or not Webiny could be a WordPress killer, and much more. Watch on YouTube

Good Morning Serverless with Tom McLaughlin
I had a blast chatting with Tom McLaughlin on his Good Morning Serverless Show last week. It airs every Thursday morning at 8:30 am ET, and he’s always looking for guests, so be sure to sign up.

DynamoDB with Alex DeBrie
Alex DeBrie seems to be the hardest working man in DynamoDB right now 😂, making the rounds on the podcast circuit. He has a great interview with Jeff Meyerson on the Software Engineering Daily podcast that you definitely should check out.

New from AWS 🆕

Announcing the New Version of the Well-Architected Framework
Not specific to serverless, but it’s great to see the Well-Architected Framework evolving based on customer feedback and experience. More on it here.

Amazon Comprehend launches real time Custom Entity Recognition
This is a great update that allows you to identify terms that are specific to your domain in real time. If you’ve ever worked with NLP, you’ll know how important this is.

Docker and AWS collaborate to help deploy applications to Amazon ECS on AWS Fargate
Great news for those still using containers for parts of your workload. You can now use Docker Desktop and Docker Compose to deploy containers on Amazon Elastic Container Service using the AWS Fargate launch type. No need for third-party tools anymore.

Amplify CLI adds support for Lambda layers to easily share code & assets across Lambda functions
Amplify CLI now makes it easy to use Lambda layers to share code & assets across various Lambda functions. Plus, you can add existing Lambda layers to your Lambda functions by referencing existing Lambda layer ARNs.

Amazon Athena adds support for managing data catalogs using AWS CloudFormation
No more using the console or APIs to register your data sources. You can now create, update and delete your data sources using the AWS CloudFormation AWS::Athena::DataCatalog resource.

Amazon DocumentDB (with MongoDB compatibility) adds support for cross-region snapshot copy
This is a nice feature for all you MongoDBers out there. You can now copy a snapshot to another region for the purpose of disaster recovery, security, or to populate a development/test environment.

Amazon Keyspaces now enables you to back up your table data continuously by using point-in-time-recovery (PITR)
And for all your Cassandra(ers), PITR provides you with continuous backups of your Amazon Keyspaces table data to help you protect against accidental writes or deletes. When enabled, it’ll back up your table data automatically with per-second granularity and then you can restore your table data to any second in time in the preceding 35 days. Crazy.

Serverless Jobs 👩‍💻 Sponsored

Serverless Engineer – stedi.com
At Stedi, we’re working in one of the biggest markets on the planet – EDI, the technological backbone of the physical product economy. We’re building a next-generation platform: a ubiquitous commercial trading network to automate the trillions of dollars in B2B transactions exchanged by nearly every company on Earth. If you’re interested in what we’re building and how we’re building it, we’d love to hear from you.

Have a job listing you’d like to share? Please contact me for more information. 

Upcoming Serverless Events 🗓

There are a lot of upcoming serverless events, webinars, livestreams, and more. If you have an event you’d like me to mention, please email me.

July 22, 2020 – Serverless 201: Advanced Development and Monitoring with AWS, Stackery, and Lumigo

July 27/28, 2020 – ServerlessDays Virtual

July 30, 2020 – Building Intelligent Application Flows in the Cloud and On-premises with TriggerMesh (Webinar)

September 3, 2020 – ServerlessDays Warsaw

October 1-2, 2020 – ServerlessDays Hamburg 2019

Serverless Star of the Week ⭐️

There is a very long list of people that are doing #ServerlessGood and contributing to the Serverless community. These people deserve recognition for their efforts. So each week, I will mention someone whose recent contribution really stood out to me. I love meeting new people, so if you know someone who deserves recognition, please let me know.

This week’s star is Gal Zabib (@GalZabib). Gal is the co-founder and CEO of Altostra, an intuitive serverless development platform that helps developers build modern cloud applications. Altostra allows for quicker serverless adoption by automating development workflows, which is incredibly helpful for teams looking to hit the ground running. Gal’s background in software engineering and leading R&D certainly has given her great insight into the needs of teams looking to adopt serverless. Thank you, Gal, for making it easier for other teams to adopt serverless quickly and confidently! 🙌

Final Thoughts 🤔

Remember last week when I said it was getting harder and harder to narrow down all the amazing serverless posts? Well, it was even harder this week. If I didn’t include your post, please feel free to shoot me a DM and I’ll be happy to retweet it. The amount of serverless content and ideas being generated is incredible, which is a great sign for serverless adoption. Keep the posts coming, and I’ll keep working to find additional ways to amplify them.

I hope you enjoyed this newsletter. We’re always looking for ideas and feedback to make it better and more inclusive, so please feel free to reach out to me via Twitter, LinkedIn, Facebook, or email.

Until next week,
Jeremy

P.S. If you like this newsletter, and think others would too, please do me the honor of sharing it with friends and coworkers who are interested in serverless.

Off-by-none: Issue #97

Serverless Reference Architectures for the Rest of Us… 👩‍🏫

Welcome to Issue #97 of Off-by-none. Thanks for joining us this week!

Last week, we learned how serverless applications can be truly vendor neutral and how EFS is finally makes serverless ML a reality. This week, we announce a new way to explore serverless architectures, learn how to debug and load test serverless applications, and we finally get “connection pools” from Lambda. Plus, we have lots of awesome content from the serverless community.

Serverless News & Announcements 📣

Webinar: Building Intelligent Application Flows in the Cloud and On-premises with TriggerMesh
Join us July 30 as we build some example Bridges. One will perform sentiment analysis on ZenDesk tickets using AWS, another will execute an Oracle Cloud function in response to a change in an on-premises OracleDB. See you there! Sponsored

Announcing the Serverless Reference Architectures Project
Shameless plug here for the new Serverless Reference Architectures Project that I just launched. I have been sharing and discussing serverless microservice patterns for years, and finding a better, more interactive way to share them has been a goal of mine for quite some time. This is just the first step, but I hope people find it useful and will contribute their own patterns and examples to help others.

Fauna Raises $27 Million to Continue Providing Cutting Edge Solutions for Developers
I love seeing companies in the serverless space raising money. It’s inevitable, serverless will (someday) take over the world. Will Fauna be the global datastore of choice when that happens?

Vendia raises $5.1M for its multi-cloud serverless platform
No surprises here. Tim Wagner, and the former head of blockchain at AWS, Shruthi Rao, are the ultimate serverless dream team. This is another company/space to pay attention to.

Dfinity demo’s its TikTok clone, opens up its ‘Internet Computer’ to outside developers
Speaking of blockchain, what do you get when you cross serverless with blockchain, and then mix in some WebAssembly? Apparently an “Internet Computer” that can run distributed applications without servers, databases, or firewalls.

Production-Ready Serverless is back (with improved curriculum)!
Yan Cui’s course was groundbreaking when it first launched, now it has the benefit of feedback and iteration on its side. Not only that, but he’s offering it in a much more interactive way. This is probably the best serverless training resource out there.

Gartner Names Lumigo a Cool Vendor in Performance Analysis for Cloud-Native Architectures
When you’re working hard behind the scenes to try and build something amazing, getting positive feedback like this is important. And for the record, Lumigo has been in my “Cool Vendor” column for quite some time. 😉

Epsagon Achieves Privacy Shield Framework Certification
Certifications like this are a sign of maturity, so congrats to Epsagon for doing the work to not only bring you an awesome product, but also to bring it up to the highest standards of security and privacy.

Serverless Stories 📖

Serverless Web Apps in Python
A good collection of tips and tricks based on what Sanjay Siddhanti learned while using Zappa to build serverless applications.

Serverless-Side Rendering With Lambda at Edge
Great use case and example explained by Joe Duran that uses Lambda@Edge to render static pages for their application. Interesting note in there about solving the problem of competitors scraping their public API. SPAs can be great for many reasons, but making data easily accessible via an API, might not be the best strategic choice.

Serverless Use Cases 🗺

Monitor & Debug Serverless with 30-Second Auto-Instrumentation
Complete observability over your serverless environment with no code changes required. With one-click distributed tracing, Lumigo lets you effortlessly find & fix issues in serverless and microservices environments. Get serverless-specific smart alerts before they impact performance or cost. Sign up for a free account and get up & running in minutes. Sponsored

Serverless BERT with HuggingFace and AWS Lambda
Awesome post by Philipp Schmid that shows you how to build a serverless question-answering API with BERT and HuggingFace. These ML use cases for serverless are great.

Create a COVID-19 dashboard with Angular 9+Serverless+AWS Lambda
Angular would not be my first choice, but to each their own. This post shows how to create a server-side rendered backend that loads a datasource and generates graphs using AWS Lambda.

Send Emails Serverlessly With Node.js, Lambda, and AWS SES
Another serverless use case that is becoming a standard go-to solution. Angad Singh shows you how to set up and test this in a sandbox environment. This post just scratches the surface of what’s possible.

Serverless Concepts 🏗

How to Debug AWS Lambda Performance Issues
Latency can have a huge impact on the business metrics of your applications, so making sure you are achieving an acceptable level of performance is hugely important. Yan Cui has another excellent post that dives deep into how to debug these issues and optimize your use cases.

Protect your RDS MySQL DB from AWS Lambda Scalability
Matt Coulter has added a new pattern to his CDK Patterns site that implements the new RDS Proxy service. The code is available in Python and Typescript. Good stuff.

Deletion Policy To Keep Serverless Stack Safe
Simple, yet powerful reminder by Rajesh Kankran to set deletion policies for production AWS services so that you don’t accidentally lose data. It’s okay to admit that it happened to you.

Challenges of Going Serverless (2020 edition)
This is a good overview by Mariliis Retter that outlines some of the common challenges of developing serverless applications. I totally agree that serverless has many challenges and causes for confusion due to the unknowns. But it’s still totally worth it.

Disaster Recovery strategies using AWS Serverless Services
This is a good read by Harshavardhan Ghorpade that explains the importance of Disaster Recovery and how serverless helps us achieve that at a much lower cost that traditional serverfull environments.

Serverless Tutorials 👷‍♀️

Build serverless apps that seamlessly connect to MySQL & PostgreSQL databases
Amazon RDS Proxy is a fully managed, highly available database proxy that allows applications to pool and share database connections, improving database efficiency, application scalability, and security. Previously launched in Preview at AWS re:Invent in 2019, RDS Proxy is now generally available and can be enabled for MySQL and PostgreSQL workloads through both the Amazon RDS and AWS Lambda consoles. Sponsored

Load testing a web application’s serverless backend
It’s all fine and good to say that serverless can easily scale, but do you know if your architecture actually can? This is why load testing is so important to confirm your system’s scalability before you realize it during a Black Friday sale. James Beswick has another excellent post that walks you through setting up the tools and running the experiments to make sure you serverless system will handle anything you throw at it.

It’s simple with AWS: A step by step serverless fan-out architecture guide
Rafael Rodriguez has a great tutorial that shows you how to implement the fan-out pattern using AWS serverless services. He’s using an SNS topic in this example, but EventBridge could also be another effective way to implement it.

Handling webhooks with EventBridge, SAM and SAR
Slobodan Stojanović explains the evolution of webhook implementations at Vacation Tracker and then shows you how to create a SAR app that publishes incoming message to an EventBridge event bus for further processing.

Deploying Serverless Golang APIs With The AWS CDK
Go is screaming fast on Lambda, so it’s becoming a popular choice for developers building serverless applications. Dennis O’Keeffe has created a tutorial that shows you how to deploy a Golang API using the AWS CDK.

Chromium and Selenium in AWS Lambda
Headless browser running in an AWS Lambda function? No problem. Vittorio Nardone shows you how to get Chromium up and running and then how to use Selenium to run some tests.

Serverless Reads 🤓

The GoLD Stack
We don’t see enough articles that look at serverless from a management perspective, and as we see more developers adopting it, I think it’s wise to be able to effectively communicate the value “up-the-stack”. Zef Hemel put some thoughts out there on this as it relates to using Go with Lambda and DynamoDB.

The truth about Serverless
How can you not click on a title like this? But seriously, Gareth Thomas outlines the perceived pros and cons of serverless and then offers a reality check for each one.

You’re not ready for feature flags
Another batch of good advice from Forrest Brazeal about making sure you nail down the basics of cloud deployments before you go ahead and try getting all fancy-like.

Why do so few vendors in the serverless space offer metered billing?
Interesting observation by Paul Swail about why most third-party serverless products are using a quota-based billing model instead of a more “serverless” pay-per-use model. He partially answers his own question, but definitely something to think about if you’re building a business in this space.

My Time as a Black Woman Software Engineer at Capital One
Though it isn’t about serverless, I had to include this incredibly brave post that recounts the horrific experience suffered by a black woman working as a software engineer. As I read this, my heart sank to the floor. The ideas and contributions of underrepresented people are far too often marginalized or hijacked by the current culture in tech. If you witness anything like this (even the things that may seem small to you), please speak out and stand up for changing toxic cultures.

Podcast, videos, and more… 🎧

Episode #56: Accelerating DynamoDB Workflows using Dynobase with Rafal Wilinski
In this episode, I chat with Rafal Wilinski about the challenges developers face when using DynamoDB, why DynamoDB makes sense for applications big and small, and why we need more tools like Dynobase to make working with your data easier. Watch on YouTube.

How Vendia’s founders aim to leverage serverless and blockchain to solve data sprawl
As I said before, Tim Wagner and Shruthi Rao are a serverless force to be reckoned with. This is a good article (and video interview) that goes much deeper into their vision and what Vendia is capable of.

New from AWS 🆕

Amazon RDS Proxy is Generally Available
Amazon RDS Proxy, a fully managed, highly available database proxy for Amazon Relational Database Service (RDS), is now generally available with MySQL and PostgreSQL compatibility. I think this is a good solution for those that need a better way to manage their connections from Lambda. Read more here

Amazon QuickSight now supports Lake Formation–protected Athena data sources
QuickSight users can now visualize their Lake Formation–protected Athena data, natively using the benefits that come with Lake Formation, including table and column-level access controls.

AWS AppSync introduces new 12xlarge instance for server-side API caching
AWS AppSync is a managed GraphQL service that simplifies application development by letting you create a flexible API to securely access, manipulate, and combine data from one or more data sources.

Amazon Elastic File System increases file system minimum throughput
Amazon Elastic File System (Amazon EFS) file systems using the default bursting throughput mode now have a minimum throughput of 1 MiB/s.

Amazon DocumentDB (with MongoDB compatibility) now supports T3 medium instances
Amazon DocumentDB (with MongoDB compatibility) is a fast, scalable, highly available, and fully managed document database service that supports MongoDB workloads. Amazon DocumentDB makes it easy and intuitive to store, query, and index JSON data. Amazon DocumentDB now supports t3.

Serverless Tools 🛠

DRY (Don’t Repeat Yourself) on the cloud with Pulumi
This is a nice write up about using Pulumi to build repeatable cloud deployments. If you’re not familiar with Pulumi, it’s like a CDK for all major cloud vendors.

serverless-ghost
Jeshan Babooa ported the Ghost project to Lambda, which should give you a way to run the blogging platform serverlessly. It is very early on and there are some expected issues, but it’s a good start.

Koyeb Serverless Data Processing Platform Early Access
I came across this article about a new tool for easily building serverless workflows. Looks really interesting.

Thoughts from Twitter 🐦

So, I was going to write up a whole blog post about DynamoDB performance in Lambda with Deno. But ultimately the whole things can be represented by this picture. ~ Matthew Bonig
Click to see the picture, but it doesn’t take a thousand words to describe it. Deno is not ready for primetime with Lambda and DynamoDB.

Serverless Jobs 👩‍💻 Sponsored

Serverless Engineer – stedi.com
At Stedi, we’re working in one of the biggest markets on the planet – EDI, the technological backbone of the physical product economy. We’re building a next-generation platform: a ubiquitous commercial trading network to automate the trillions of dollars in B2B transactions exchanged by nearly every company on Earth. If you’re interested in what we’re building and how we’re building it, we’d love to hear from you.

Have a job listing you’d like to share? Please contact me for more information. 

Upcoming Serverless Events 🗓

There are a lot of upcoming serverless events, webinars, livestreams, and more. If you have an event you’d like me to mention, please email me.

July 9, 2020 – Debugging AWS Lambda Performance Issues

July 9, 2020 – Good Morning Serverless with Tom McLaughlin (I’ll be his guest)

July 30, 2020 – Building Intelligent Application Flows in the Cloud and On-premises with TriggerMesh (Webinar)

October 1-2, 2020 – ServerlessDays Hamburg 2019

Serverless Star of the Week ⭐️

There is a very long list of people that are doing #ServerlessGood and contributing to the Serverless community. These people deserve recognition for their efforts. So each week, I will mention someone whose recent contribution really stood out to me. I love meeting new people, so if you know someone who deserves recognition, please let me know.

This week’s star is Josh Carlisle (@joshcarlisle). Josh is a Senior Sales Engineer – Partner Channel for AppDynamics, and a Microsoft MVP (Azure). In his role at AppDynamics, Josh provides technical and sales enablement to strategic partners implementing AppDynamics on the Azure platform. Based in Raleigh, he’s active in the local serverless community, co-organizing and participating in meet-ups, user groups, and code camps. Josh has also spoken at conferences around the country, including ServerlessDays events in Austin, Nashville and Amsterdam. Thank you, Josh, for sharing your knowledge and passion! 🙌

Final Thoughts 🤔

I mentioned in tweet that it’s getting harder and harder to narrow down all the amazing serverless posts that are being published every week. As you’ve probably noticed, this newsletter gets quite long, and I’m only including a fraction of the posts that I collect and review. I have a lot of ideas about how to make this better, so stay tuned for some upgrades to the Off-by-none experience coming soon.

In the meantime, be sure to check out the Serverless Reference Architectures Project and contribute your thoughts, ideas and patterns. The more examples, the better, so people can learn and experiment with the tools and languages they are comfortable with. #ServerlessForEveryone

I hope you enjoyed this newsletter. We’re always looking for ideas and feedback to make it better and more inclusive, so please feel free to reach out to me via Twitter, LinkedIn, Facebook, or email.

Take care,
Jeremy

P.S. If you like this newsletter, and think others would too, please do me the honor of sharing it with friends and coworkers who are interested in serverless.

The Simple Web Service

A basic of pattern for creating a serverless API or web service. This example uses DynamoDB as the database because it scales nicely with the high concurrency capabilities of AWS Lambda.

Interactive Reference Architecture

Click on the components or numbered steps below to explore how this architecture works.

This is the most basic of patterns you’re likely to see with serverless applications. The Simple Web Service fronts a Lambda function with an API Gateway. I’ve shown DynamoDB as the database here because it scales nicely with the high concurrency capabilities of Lambda.

Deploy this Pattern

Below are the basic configurations for deploying this pattern using different frameworks and platforms. Additional configuration for your environment will be necessary. The source files and additional examples are available in the GitHub repo.

  • Are you a CDK Guru?
    Would you like to contribute patterns to the community?
    Check out the Github repo!

The Scalable Webhook

Simple pattern for handling high-velocity or unpredicatable workloads while mitigating downstream pressure.

Interactive Reference Architecture

Click on the components or numbered steps below to explore how this architecture works.

If you’re building a webhook, the traffic can often be unpredictable. This is fine for Lambda, but if you’re using a “less-scalable” backend like RDS, you might just run into some bottlenecks. There are ways to manage this, but because Lambda supports SQS triggers, we can throttle our workloads by queuing the requests and then using a throttled (low concurrency) Lambda function to work through our queue. Under most circumstances, your throughput should be near real-time. If there is some heavy load for a period of time, you might experience some small delays as the throttled Lambda chews through the messages.

You’ll also want to handle failed messages using a Dead Letter Queues (DLQ). The SQS Poller will adjust its polling frequency based on your Lambda function’s concurrency. You’ll need to configure your redrive policies to appropriately handle failed messages.

Deploy this Pattern

Below are the basic configurations for deploying this pattern using different frameworks and platforms. Additional configuration for your environment will be necessary. The source files and additional examples are available in the GitHub repo.

  • Are you a CDK Guru?
    Would you like to contribute patterns to the community?
    Check out the Github repo!