How to switch from RDBMS to DynamoDB in 20 easy steps…

I posted a thread on Twitter with some thoughts on how to how to switch from RDBMS to DynamoDB. Some people have asked me to turn it into a blog post to make it easier to follow. So here it is… with some bonus steps at the end. Enjoy! 😁

Continue Reading…

Developing Serverless Applications Locally with the “serverless-cloudside-plugin”

Developing and testing serverless applications locally can be a challenge. Even with tools like SAM and the Serverless Framework, you often end up mocking your cloud resources, or resorting to tricks (like using pseudo-variables) to build ARNs and service endpoint URLs manually. While these workarounds may have the desired result, they also complicate our configuration files with (potentially brittle) user-constructed strings, which duplicates information already available to CloudFormation.

This is a common problem for me and other serverless developers I know. So I decided to come up with a solution.

Continue Reading…

Off-by-none: Issue #28

Live from ServerlessDays Boston…

Welcome to Issue #28 of Off-by-none. Thank you so much for being a part of the community! 🙌

Last week we looked at Lyft’s AWS bill and what it means for multi-cloud. This week we’re live at ServerlessDays Boston, plus we’ve got plenty of great stories and content from the community.

Lots of serverless stuff to get to, so here we go! 🚀

Charity Majors giving the opening keynote at ServerlessDays Boston

Serverless Product Announcements 📢

Meet the Adobe I/O Team: Mihai Corlan on Building Adobe’s Serverless Platform
Adobe’s developer tools is introducing Adobe I/O Runtime, a serverless platform built on top of OpenWhisk. You likely won’t build all your apps there, but this is an interesting way to interact with your Adobe data from collocated execution environments. Props for not naming them “functions.” 👍

Easy Observability and Monitoring with Lambda Layers
The team over at IOpipe put together a handy guide that shows you three ways to add their service using Lambda Layers. While the guide is about their service, you can apply these to any Layer.

Manage table resources in serverless
Chris Feist created a new plugin for the Serverless Framework that reduces the amount of boilerplate needed to create DynamoDB tables.

SQL order from API chaos
A new “API composition platform” called Transposit just recently appeared. “Transposit is a zero-ops platform that brings the power of a relational database to the API ecosystem. Our relational engine provides the ability to write SQL and JavaScript to query and transform your data as though each data connection were a virtual table in a single relational database.” Hmm. 🤔

Serverless Use Cases 🗺

Dyson Fan Control over MQTT via Serverless
Here’s an interesting use case. Nathan Glover set up a couple of Lambda functions to control a Dyson Fan by using the public MQTT endpoint.

Build a serverless data pipeline with AWS S3 Lamba and DynamoDB
More of a how-to, but goes to show an interesting use case for putting dependencies into a separate layer.

Async APIs
Richard Boyd’s post addresses a common use case for long-running or throttled asynchronous events.

If you’re new to Serverless… 🐣

What can serverless do for Node.js developers?
If you’re a Node.js developer and want to know how you can up your game with serverless, this short article will give you a good primer.

Best Practices for Serverless Development
Here’s another best practices post that will give you some good ideas whether you’re new to serverless or a hardened veteran.

How to Get Started With Serverless, Express and AWS Lambda
If you are thinking about migrating your Express app to a monolithic Lambda function, this post’s for you. While not a best practice, this is a common use case for those just getting started. I’ll allow it (for now). 😉

Serverless FAQ
Have questions about serverless? Know someone that does? This short post by the Serverless Gurus answers some of the common questions that our newbie friends might have.

Deploy your existing Nodejs APIs in serverless 
Another post about using the Serverless Framework to migrate your Node.js workload to Lambda. Some helpful setup tips in here as well.

Create a Highly Scalable Image Processing Service on AWS Lambda and API Gateway in 10 Minutes
This is a detailed walkthrough of how to use the AWS console to setup an image processing service with Python. This is a good post for the beginner because it walks you through all the configurations by hand. But please, learn how to write this as IaC before you go into production.

Serverless Tutorials 👷‍♂️

Everything you ever wanted to know about the Amazon DynamoDB console but were afraid to ask: A detailed walkthrough
If you’ve been using DynamoDB for awhile, you’ve likely been using CloudFormation to build your tables. This is a good post to show us how powerful the console is when you want to explore your data and configurations.

How to Configure and Connect to Serverless MySQL Database
For many a developer, you will need to pry RDBMS from their cold dead hands. That’s okay. I still use MySQL with some of my serverless applications (yes, it is possible). This is a good tutorial to show you how to get a cluster configured and connect from an execution environment.

Dynamize your resources’ parameters with the Serverless Framework!
This is a helpful post that shows you how to inject parameters into your serverless application configurations. This is extremely useful for managing variables between stages.

How to set up AWS accounts for multiple product environments
This is an extremely common use case, and if you’re not in the business of setting up nested AWS accounts all the time, it’s easy to get confused. Paul Swail has this nice write up that should save you some time.

Creating an AWS DocumentDB Cluster
The Serverless Gurus have been busy this past week. Here is another great post that will walk you through setting up a new AWS DocumentDB Cluster. Whether you should or not is another question.

Sharing Lambda Layers and Restricting Your Own Usage
Zac Charles has a great post that gives you some of the ins-and-outs of sharing Lambda Layers. If you’re planning on publishing your own, this is a useful guide to make sure you get the permissions right.

Securing APIs in Serverless (AWS Lambda)
A detailed post that shows you how to secure your API Gateways using Amazon Cognito. Not always as straightforward as you might think.

Tutorial: Setting up a private subnet on AWS
If you need to use VPCs with your serverless components, use this guide to configure your environments correctly.

Serverless Stories 📖

How Shamrock transacts billions of dollars with Serverless Framework Enterprise
Great story about Shamrock moving from containers to Lambda using the Serverless Framework. They are apparently using a “multi-cloud” strategy, so let’s see how that plays out.

ETL (Extract, Transform, Load) in Insights
Shiyang Fei discusses the decision making process that Compass used to choose between Apache AirFlow and AWS Step Functions. Lots of pros and cons outlined in here, and spoiler alert: they chose Step Functions.

Reflections on Serverless:From SOA to Serverless part 2
An interesting discussion from Diego Pacheco describing the architecture evolution from SOA to Serverless. Part 2 focuses on strategy evolution and architecture strategy.

Serverless Reads 👓

What AWS Lambda Users Should Know About Azure Functions, and Vice Versa
I’m a huge AWS fan, but it’s good for us serverless developers to see what other cloud providers are offering. Mahdi Azarboon gives us a breakdown of the differences between Azure Functions and Lambda.

Understanding the scaling behaviour of DynamoDB OnDemand tables
Yan Cui gives us another excellent post that takes a deep dive into DynamoDB on-demand tables. He’s got everything you need to know about costs, auto-scaling, and pre-warming to handle massive throughput.

Lambda Concurrency Limits and SQS Triggers Don’t Mix Well (Sometimes)
Another great post by Zac Charles that highlights some of the issues around SQS Triggers with Lambda functions. The ability to consume SQS with Lambda was a welcome addition, but you need to be a bit prescriptive when configuring your concurrency and redrive policy settings.

A Serverless 2.0 point of view
Alain Rouen says the evolution in the serverless movement is arriving and explains why it is important to understand it and how it will change the way we build apps.

3 Tips to Control the Cost of AWS Lambda
Emrah Samdan from Thundra gives us three excellent tips to help you reduce your Lambda costs.

Can you use database pooling with serverless?
Alastair Taft asks this question and gives us five possible solutions for using database pooling with Postgres and AWS Lambda. Luckily for us, AWS is working on better solutions for this problem.

The main stories from QCon London ’19
QCon London was last week, and Alex Wauters gives us a good roundup of the event. There is an interesting discussion about serverless in here.

Introduction to Monitoring Serverless Applications
A good read that will give you the basics.

When you’re wondering what AWS has been up to… 🛠

AWS Amplify Console supports instant cache invalidation and delta deployments on every code commit
Great new feature that will automatically invalidate CloudFront caches when you publish new code. If you’ve ever needed to do a manual cache invalidation, you’ll appreciate this.

Automate Releases to the AWS Serverless Application Repository using AWS CodePipeline
Eliminate the need to use the SDK or console to publish changes to your SAR apps. No more extra code needed. 👍

AWS Step Functions Adds Tag-Based Permissions
Control access based on tags using AWS Identity and Access Management. Very cool.

New Amazon SNS Console Now Available
Updated user interface in the new Amazon SNS Console is optimized for screens of all sizes, making configuration, management, and monitoring more accessible on a variety of devices.

Upcoming Serverless Events 🗓

Serverless Application Troubleshooting
This webinar, tomorrow (March 13th), features Erez Berkner talking about gathering the right data and improving your team’s velocity with distributed serverless visibility and monitoring.

AWS Lambda Security: Inside & Out
Mike Deck, Principal Solutions Architect at AWS, and Ory Segal, CTO & co-founder at PureSec, are running a webinar covering deep topics in serverless and AWS Lambda security. Happening on April 3, 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 Zac Charles (@zaccharles). Zac is Lead Engineer at JUST EAT and has been quite prolific lately with his serverless blog posts. He shares a lot of his work with C# and .NET on AWS Lambda and has a number of open source projects including LambdaNative and LambdaRemoteDebug. He’s also an active voice on Twitter. Keep the great content coming, Zac. The community appreciates it! 🙌

Final Thoughts 🤔

ServerlessDays Boston is in full swing and there have already been several amazing talks, with many more to go. If you’re here, come say “HI!” and make sure you grab some “Off-by-none” stickers. Looking forward to writing a few follow up posts on what we learned today. Just need to decompress first.

I hope you enjoyed this issue of Off-by-none. Please feel free to send feedback and suggestions so I can keep making this newsletter better each week. You can reach me via Twitter, LinkedIn, Facebook, or email and let me know your thoughts, criticisms, or how you’d like to contribute to Off-by-none.

And please do me the honor of sharing this newsletter with your friends and coworkers who might be interested in serverless. It would be greatly appreciated. 👍

Take care,
Jeremy

Off-by-none: Issue #26

Introducing the new serverless heroes…

Welcome to Issue #26 of Off-by-none. It is great to see you all again! 😃

Last week we thanked IOpipe for supporting open source and explored some helpful serverless architectural patterns provided by AWS and others. This week, we figure out if serverless is really dead, meet some new serverless heroes, and share lots of great content and stories from the community.

It was a busy week for serverless, so let’s get to it. 🚀

When you’re holding out for a hero ’til the end of the night… 👨‍🚀👩‍🚀

AWS announced its latest round of AWS Serverless Heroes, including Ant Stanley, Matt Weagle, Kurt LeeShingo Yoshida, and me! ☺️ It is an incredible honor to be welcomed into this remarkable group of people doing amazing things with serverless. And a huge thank you to all of you for reading this newsletter, my blog posts, and my Twitter ramblings. If it wasn’t for you sharing and retweeting, this wouldn’t have been possible. 🙌

I already had quite a few things planned for 2019, and this just makes me want to do more to help the serverless community learn and grow.

When you hear a rumor that Serverless is Dead… ☠️

Chris Munns of AWS gave the closing keynote at ServerlessDays Austin and proclaimed that Serverless is Dead! Don’t worry, “Modern application development using managed services that provide opinionated event-driven interfaces” isn’t going away. This was about the death of the term by “extreme buzzword trauma,” as he called it. I had tried to tell people to Stop Calling Everything Serverless, but I think Chris is right, our enemies were too many. 🧟‍♂️

So what do we do now that the term “serverless” is being applied everywhere to everything? We could try to ignore it, or as Chris said, “we should instead be focusing on what we’re seeing to be the new way of doing modern application development.” This is an important point. While confusion is sure to abound, and perhaps have a short term impact on adoption, eventually, “serverless” will just be the way to build applications in the cloud.

In Paul Johnston’s most recent post, Cloud 2.0: Code is no longer King — Serverless has dethroned it, he argues that code is a liability. The evolution of the cloud will be in understanding what services to use and when, and perhaps more importantly, when not to write code. This allows teams to build faster and solve problems that actually impact customers, as opposed to unnecessary problems they bring on themselves.

Okay, so maybe it’s too late to salvage the term “serverless”, but the vision and the evolution is just beginning. To quote Chris again, “Long live serverless!” 

When you’re looking for the latest serverless announcements… 🔈

Serverless Framework v1.38 has been released, now with support for WebSockets. So that’s pretty cool.

Last week, we mentioned that IOpipe was sponsoring my Lambda API and Lambda Warmer open source projects. This is actually part of their New Serverless Open Source Sponsorship Program, so look forward to more generous sponsorships in the future.

Stackery just announced their new pricing plans, which includes a free developer tier. If you’d rather use a visual interface instead of going cross-eyed writing YAML files, give them a look.

For those of you that love to get your Java on, Microsoft announced the general availability of Java support in Azure Functions. Even cooler, you can use the Azure Functions Maven plugin to create, build, and deploy your functions from any Maven-enabled project.

When you want some expert advice… 👩‍⚕️

ServerlessDays Boston is in 2 weeks! Tickets are only $49 and include breakfast, lunch, drinks at the happy hour, and an insane amount of serverless knowledge from an amazing lineup of speakers. Please spread the word to your friends and colleagues.

James Beswick joins a webinar with Stackery on February 27th to teach you how to Save time and money with AWS Lambda using asynchronous programming.

If you want to know How to Accelerate Serverless Adoption, sign up for this webinar on March 7th with Shannon Hogue from Epsagon and Avner Braverman from Binaris. Should be interesting.

If you want more from Epsagon, you can also sign up for the Best Practices to Monitor and Troubleshoot Serverless Application webinar on March 7th as well.

The AWS Serverless Webinar: Unleash Innovation & Enable Legacy (Four-Part Session) is scheduled for Thursday, March 21st. AWS’s Steve Liedig will be joined by new AWS Community Hero, Aileen Smith, and others, for what’s sure to be a very educational series of sessions.

A Cloud Guru announced that Serverlessconf 2019 will be held from October 7th through the 9th in New York City. Definitely looking forward to this.

When you want to hear some interesting Serverless Stories… 📖

There certainly is a learning curve for serverless, and even those of us with a lot of experience tend to scratch our heads now and again. In Dear deployment diary: serverless is f**king hard, the author points out the challenges that larger companies face when the line between developer and operations become blurred.

On the subject of serverless not always being easy, Pavol Fulop gives us some Takeaways from using AppSync, which entails a lot of struggles. It’s always interesting to hear where people are getting stuck.

For those of you that have been putting off building that side project, here’s another example of how a developer created a MVP in 1 week for $10 while working a full-time job. It’s not the most complex app, but it goes to show how quickly serverless can get you up and running.

Benedikt Eckhard’s piece, My First Alexa Skill — Lessons Learnt, is an in-depth look at how he went about designing, building, deploying, and testing an Alexa skill. Some really good lessons in here.

Jeff Lu explains how his team took a serverless approach to Weather Underground in order to generate Intellicast radar maps.

And, Things about serverless I wish I used from the start by Antonio Terreno is a quick hit list of some simple tips that can save you quite a bit of time.

When you’re wondering what’s going on around the AWS universe… 🤓

Simon-Pierre Gingras published a very helpful AWS S3 Batch Operations: Beginner’s Guide for us to start thinking about all the amazing things we’ll be able to do with this. S3 Batch is still in preview mode, but when it goes GA with Lambda support, the possibilities will be endless.

Last week, we mentioned the new AWS Solutions catalog that contains vetted, technical reference implementations that can help you solve
common problems with prebuilt CloudFormation templates. Kira Hammond built this useful AWS Solutions Update Feed that you can subscribe to, triggering an email, SQS message, or Lambda function when new solutions are added. And of course, it’s 100% serverless. 😉

Jerry Hargrove (aka @awsgeek) has some new visual notes on Amazon Transcribe. As more and more people move to audio and video on the web, I think they’ll find this to be an incredibly handy service.

If you’re curious how Jerry Hargrove keeps producing these amazing pieces of content, check out his How I Create Visual Notes at awsgeek.com — My Step-by-Step Process.

And if you like visual things, the newly released AWS Architecture Icons are available for download.

Finally, If you need your weekly dose of snark, check out Corey Quinn’s guest appearance on What’s New with AWS – Week of February 11, 2019 with Jeff Barr. Nothing serverless in here, but always good to see AWS having a little fun.

When you want to be inspired by some serverless use cases… 🗺

Alex Casalboni’s new post, Design patterns for high-volume, time-series data in Amazon DynamoDB, is a great example of how breaking with best practices sometimes creates a better solution. Beyond just this use case, there are likely several other practical reasons to auto-provision DynamoDB tables.

Nikolay Nemshilov has a fascinating read on building a Serverless Genetic Algorithm. Genetic algorithms are an extremely powerful problem solving mechanism and Nikolay demonstrates a quick and dirty solution using parallelization with Lambda functions.

Scott Ringwelski from Handshake has a post that explores Serverless Use Cases At Startups. I think he offers a fresh perspective on how mid-size startups could take advantage of serverless and how implementing odd jobs and internal automation might be a great place to start.

Lambda@Edge: Why Less is More is a good introduction to get you thinking about how powerful computing at the edge can be. There are a lot of use case around this concept, and Nuatu Tseggai from Stackery, points out a whole bunch.

When you’re looking for serverless brain candy… 🍬

Why serverless is revolutionary for product managers by James Beswick is 20 years of software development wisdom wrapped up into a 9 minute read. There is so much to unpack here, I think you just need to read it yourself.

John Demian from the Dashbird is Getting down and dirty with metric-based alerting for AWS Lambda in his new post. There are some helpful definitions in this post that explain the metrics captured by CloudWatch as well as how to set up alarms. There’s also a nice chart that shows you how observability platforms like Dashbird can extend the basic metrics and search capabilities of CloudWatch.

Making AppSync Easier with Thundra gives some more insight into how observability platforms can make monitoring and debugging your serverless applications so much easier. Using Lambda as an AppSync datasource is obviously incredibly powerful, but as this piece points out, debugging it can get a bit tricky.

Nader Dabit had some thoughts on the new Serverless paper from the folks over at Berkeley. Cloud Programming Simplified: Simplified points out a few key points from the paper and offers some of Nader’s thoughts.

Mikhail Shilkov’s new Evergreen Serverless Performance Reviews has taken his fantastic posts and made them even better. He’s now tracking the performance of serverless functions from various cloud providers and has automated them so they’re always up-to-date.

Alex DeBrie has another excellent post entitled, AWS API Performance Comparison: Serverless vs. Containers vs. API Gateway integration. Which one should you use for your workload? It depends, but Alex has some recommendations for you.

In Chaos test your Lambda functions with Thundra, Yan Cui shows us how to use an observability platform to inject errors into our serverless application and then trace them to make sure the proper fallbacks are in place. Great advice and an excellent use of these third-party tools.

When you just want to build something serverless… 🏗

Marcia Villalba has another great video that shows you how to build a Simple application with API Gateway Websockets. This is an incredibly powerful feature of API Gateway that opens up some really great use cases (and no, it’s not just chat). 💬

How to Use AWS Lambda to Send High Volume Emails at Scale outlines a serverless architecture that could give you some ideas of your own. Definitely a useful pattern if you want to own your own mass email generation.

Serverless Functions in Depth is a great tutorial for front-end developers looking to get started with serverless. I think using Amplify CLI will resonate with devs familiar with some common build tools.

For something a bit more advanced, this tutorial will show you how to create A predictive engine API deployment with AWS and serverless in minutes.

Building a Serverless Mixpanel Alternative. Part 1: Collecting and Displaying Events is the first part of a tutorial series on building an analytical web application with Cube.js. Lots of useful concepts in here.

How to build a serverless web crawler, another great post by James Beswick, will take you through several different ways to build a classic web crawler using combinations of Lambda, DynamoDB streams, SQS queues, S3 and more.

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 Ant Stanley (@IamStan). Ant was recently named an AWS Serverless Hero, and for good reason. When he’s not consulting, he’s running the Serverless User Group in London, organizing ServerlessDays London, and helping organizer around the world as part of the global ServerlessDays leadership team. He was also a co-founder of A Cloud Guru and organized the first ServerlessConf event back in 2016. I think he’s done more to spread the word of serverless than anyone else. His blog and Twitter account are also great sources for serverless insights.

Final Thoughts 🤔

I can’t thank you all enough for being a part of this newsletter. I can’t believe it’s already been six months since we started this! I try each week to capture and disseminate important and interesting stories and announcements, but I could always use more help. If there are great stories that need to be heard, or interesting use cases, or people who you feel deserve to be the star of the week, please send them to me. This newsletter is as much yours as it is mine.

I hope you enjoyed this issue of Off-by-none. Please feel free to send feedback and suggestions so I can keep making this newsletter better each week. You can reach me via Twitter, LinkedIn, Facebook, or email and let me know your thoughts, criticisms, or how you’d like to contribute to Off-by-none.

And please do me the honor of sharing this newsletter with your friends and coworkers who might be interested in serverless. It would be greatly appreciated. 👍

Until next time,
Jeremy

Off-by-none: Issue #24

Serverless will become the default computing paradigm of the Cloud Era…

Welcome to Issue #24 of Off-by-none. I’m glad you’re here! 🤘🏻

Last week we looked at how we could use serverless to deal with third-party API quotas, watched some helpful videos, and introduced “Serverless Stories.” This week, we geek out on a recent UC Berkeley paper about serverless, share some more great stories and use cases, and discuss how SaaS providers should be thinking about serverless integrations.

So much to get to this week, so let’s get to it. 🏎

When you get excited by an academic paper that says serverless is the future… 🕺💃

Cloud Programming Simplified: A Berkeley View on Serverless Computing is a new paper recently published by the University of California at Berkeley. For those of you that don’t want to read all 20 pages, here’s a quick synopsis: “Serverless computing will become the default computing paradigm of the Cloud Era, largely replacing serverful computing and thereby bringing closure to the Client-Server Era.”

If you’re interested in the details, I highly suggest reading the entire paper as it gives both a realistic look at the current limitations, but also points out how they could be (and most likely will be) solved. I wrote a recent post called Stop Calling Everything Serverless that pointed out (similar to this paper) that cloud providers monitored how their customers used virtual machines and built additional services to make those use cases better, faster, and easier. The same is true for serverless environments, with the ecosystem and available suite of services getting better each day.

The paper points out other important advantages that serverless has over (what they call) serverful architectures, and helps to clarify how modern FaaS implementations are superior to previous generations. It also notes that container technologies, like Kubernetes, are “a technology that simplifies serverful computing” and that the economies of cloud scale will eventually “diminish the importance of such hybrid applications.” This is noteworthy as we start to look at computing at the edge, and how that will affect application design.

And while there are obviously still limitations, the paper suggests advancements such as faster ephemeral and durable storage, lower startup times, and better coordination between functions, will eventually solve current system challenges. The paper also suggested introducing access to more cores, sharing of computation graphs, and collocation of functions to solve some of the networking problems and throughput issues.

The bottomline is that the cloud business is growing by 50% year-over-year, and 24% of serverless users are using the cloud for the first time. Serverless adoption is only going to grow, and as limitations get innovated out of existence, the need for serverful computing and the underutilization associated with it, are going to become less relevant. The paper doesn’t give a suggested timeline, but Forbes has some 2019 Serverless Computing Predictions.

When you’re looking for some serverless innovations and announcements… 🗣

Epsagon announced One-Click Serverless Monitoring, which lets you instrument your Lambdas functions without any configuration changes. This is the perfect use case for Lambda Layers, and it looks like they are monitoring updates to configurations, which will ensure that the layer is added on every deployment. Enforcing monitoring compliance without developers having to do anything is a huge advancement.

Dashbird announced their new incident management platform, a new component that lets you set alert conditions based on Lambda metrics. Reducing notification fatigue is a helpful way to make sure real issues are identified and addressed quickly. You can read about it in their public changelog (which I just realized they had). They also announced that they are now an AWS Advanced Technology Partner, which is pretty cool.

A new article, Lumigo: End-to-End Serverless Monitoring and Troubleshooting, gives a great overview of Erez Berkner and Aviad Mor’s new serverless observability company. There are several providers in this space now, but they’re all trying to do things a little differently. A helpful video is included with the article that shows how Lumigo deals with transaction reporting.

And congratulations to Serverless, Inc. for winning a Technology of the Year award from InfoWorld. The year’s best in software development, cloud, and machine learning highlights the Serverless Framework for being an outstanding tool that has had a massive influence on the adoption of serverless technologies. 🏆

When you feel the need to add an extra deadbolt to your serverless applications… 🔒

Hillel Solow makes the case for serverless, but points out several Serverless Computing Security Risks & Challenges. But who’s responsible for securing your serverless applications? Hillel suggests that we make it everyone’s problem by creating closer relationships with other teams in your organization.

In Serverless Computing: ‘Function’ vs. ‘Infrastructure’ as-a-Service, Ory Segal does a great job calculating the drop in security responsibilities when moving to FaaS solutions. Not all the requirements are created equal, but this is a fairly good estimate. I’d much rather be responsible for less than half of the security components versus the roughly 92% required using the IaaS approach.

Ed Moyle discusses the security implications of serverless cloud computing with a particular focus on CloudFlare Workers. While segmentation attacks and Rowhammer concerns are certainly valid in a containerized world, I think most cloud providers have a pretty good handle on this.

Puresec did some ethical hacking and took down a newsletter’s Lambda-backed signup form. Serverless Security And The Weakest Link (Or How Not to Get Nuked by App-DoS) documents how they did it (and graciously points out that it was not Off-by-none 😉). While Puresec did a good job anonymizing the victim, he was proud to take ownership (hint: it rhymes with “Maury Schwinn”). Even though this was a bit of fun, the community working together like this is a great way to learn and make our applications safer.

It was only a matter of time before McAfee jumped into the serverless security realm. The Exploit Model of Serverless Cloud Applications is a high-level overview of possible threats to your serverless applications. This picture looks scarier than the reality. Key thing to remember is that the cloud provider is handling the vast majority of network and infrastructure security for you. TLDR; Use best practices to write secure apps, scan your dependencies, and protect your secrets. Do this and your serverless applications will likely be more secure than traditional ones.

Where to go for some awesome serverless events… 🗓

IOpipe is hosting a Stories of serverless in the wild with Saks Fifth Avenue at the Serverless Seattle Meetup on February 22, 2019. Always fun to hear real world problems being solved by serverless.

Stackery also has a webinar coming up tomorrow entitled New serverless workflows, build faster than ever before. Great opportunity to brush up on your (or learn some) infrastructure-as-code skills.

And we are getting into the ServerlessDays season with several events coming one after another. Hamburg is this week, followed by Austin in just 10 days. Boston is four weeks away (and recently announced an amazing agenda), Amsterdam is in late March, and Atlanta has a crazy three-day event planned, with Zürich right on its tail. Also Tel Aviv was just announced and scheduled for June 4, 2019. Looks like you’ll need to choose between that and NYC. 🗽

Also, don’t forget that the Serverless Architecture conference in The Hague, Netherlands is being held from April 8th to the 10th. I’m actually giving two talks now, so that should be a lot of fun. There are plenty of great speakers, so be sure to get your tickets soon.

When you’re looking for some encouraging Serverless Stories… 👂

How We Moved Towards Serverless Architecture highlights the struggles that a team encounters when transitioning to serverless. Pravash Raj Upreti reviews the technologies his team used, some advantages and disadvantages of using serverless, and the choices they made in order to launch their first serverless application.

In Serverless Event Sourcing in AWS (Lambda, DynamoDB, SQS), Dom Kriskovic explains the serverless architecture used to build Beenion. He uses the CQRS pattern along with DynamoDB to capture and distribute events. I don’t agree with all of the choices, but this article does a great job exposing the tough decisions that need to be made.

Serverless GitLab Runner Builds on Lambda gives a developer’s account of experimenting with using Lambda to executed GitLab builds, inherit IAM permissions, and use additional binaries and its dependencies to execute things like terraform during the build. There some Lambda Layer experiments in there as well.

Joshua Toth built a serverless Node.js, AWS native, Serverless, IoT, FinTech project. Lots of really good information in here about the different technology choices made. Plus, the realization that the velocity of a serverless project was “mind-blowing.” 🤯

Antonio Terreno tells us about the Startup Pre-series A tech choices you can’t compromise on. Great story about a small company using serverless to build and iterate quickly. Now they have a team of 20 people.

When you’re looking for real-world serverless use cases… 🔍

While the Berkeley paper argued that certain machine learning tasks might be too much for serverless right now, Michael Hart and the team over at Bustle has news for them. In Massively Parallel Hyperparameter Optimization on AWS Lambda, they explain how they used the concepts from the Asynchronous Successive Halving Algorithm paper and applied them to text-classification with Lambda. This is a really great read and an amazing use case.

Renato Byrro from Dashbird discusses Building a Serverless News Articles Monitor that can be used to extract article data in a structured format. They also made it open source for you to use.

Generating thumbnails is a common use case given for serverless, but what about generating complex PDFs? Marc Mathijssen came up with a way to do this using the power of Apache FOP in a .NET world using Azure Functions.

Nader Dabit takes us through Building Chatt – A Real-time Multi-user GraphQL Chat App in his recent post. The code is also open source, so not only is this a good use case, but also a helpful template to get you started with serverless.

What to do if you’re craving some good serverless reads… 📖

Alex DeBrie put together the Complete Guide to Custom Authorizers with AWS Lambda and API Gateway for you, and it is an awesome resource. Anyone who has played around with custom authorizers is sure to have some of their own war stories, so having this as a reference could be a lifesaver (metaphorically speaking).

Gojko Adzic introduces us to BaDaaS and the future of cloud integration. He explains that there is a new pattern called “Business action deployment as a service” (or BaDaaS), that allows service providers to offer application components that interact directly with FaaS services instead of passing data through webhooks. Twilio is already doing it, and last week we mentioned Braintree’s serverless payment functions initiative. Pay attention SaaS providers, a new standard might be emerging.

The New Stack’s How Serverless Platforms Could Power an Event-Driven AI Pipeline is another take on how to bring machine learning into the serverless world. It rightly suggests that “event-driven artificial intelligence (AI) can lead to faster and smarter decisions” and will take a “hybrid architecture structure that takes the best of serverless and combines it with stateful database stores” in order for it to be applied successfully. Obviously we need a database to store training data, but I think we’ll see more serverless alternatives to this sooner rather than later.

If you’d rather not read, you can watch Marcia Villalba talking about Serverless with Ben Kehoe. Another insightful interview featuring someone definitely worth listening to.

Finally, Cory Schimmoeller says that Using AWS Amplify feels like cheating, and he may be right. This is a good overview of how simple it is to use Amplify and the CLI to connect to your AWS backends.

What to do if you’re new to serverless… 🐣

Have no fear, Toby Fee from Stackery takes you through the Anatomy of a Serverless App. This post explains the three layers of a serverless application (business logic, building blocks, and workflow dependencies) and acts as a great primer for the newly initiated.

Serverless Computing 101 is another overview of what serverless computing is, how it works with other resources (or BaaS), and highlights some use cases. Not all the “demerits” are created equally, but certainly gives you something to think about.

Eric Sales De Andrade helps you answer if serverless is right for your next application in Should I go “Serverless” — How to choose the right solution for Your Product and Business. Like most of these types of posts, the pros and cons are laid out for you. But my suggestion, just go serverless. 😉

When you want to get hands-on with some serverless how-tos and tutorials… 🛠

Yan Cui gives us the lowdown on AWS Lambda and Secret Management in a recent post. Should you choose Parameter Store, Secrets Manager, or HashiCorp’s Vault? Yan walks you through the when, why and how.

Many people associate the terms “machine learning” and “artificial intelligence” with lots of math and complexity that make them seem unapproachable. But the reality is that powerful ML and AI services are readily available and easy to integrate with your applications. James Beswick show us how to build a serverless Twitter bot using sentiment analysis so that you can automatically like positive comments on your tweets. And it’s much easier to do that you probably think.

Debugging Chronicles: Missing Lambda Invocation is more of a tip (and a warning) from Davide de Paolis. TLDR; make sure you pass the Authorization header for every request that is using Congito with API Gateway. 🤦🏻‍♂️

Optimizing your Node.js lambdas with Webpack and Tree shaking is a great post by Erez Rokah that shows you how to use Webpack to remove unused modules when packaging your Node.js files for deployment to a serverless environment. He gives an example of reducing his deployment package from 740.6kB to 6.6kB.

If you’re using the .NET runtime, it might be helpful to know How to Unwrap an AggregateException Thrown by AWS Lambda. Zac Charles shares the secret of setting the right environment variable. He also shared how to make .NET AWS Lambda Functions Start 10x Faster using LambdaNative, a handy Lambda Layer that you can use.

If you’re working with Azure, David Pallmann has a full tutorial on how to build a Document Search Engine using Azure Functions and Cosmos DB.

Julian Tellez from DAZN gives us some tips for Handling complexity in lambda functions using his Lambcycle middleware component for AWS Lambda.

If you still haven’t played around with Lambda Layers yet, Eric Johnson’s Working with AWS Lambda and Lambda Layers in AWS SAM post is an awesome overview to get you started (or take you even further down the rabbit hole).

And why not combine the power of WebSockets, Machine Learning, and Translation services to build a better chat application? Danilo Pocci gave a recent presentation called Serverless real-time apps: Let’s build a “positive” chat that does just this. The architecture is all in the slides, plus you can check out the demo here.

Finally, if you are building Large (Java) Applications on Apache OpenWhisk, James Thomas has some very helpful tips and tricks for you.

When you’re wondering what AWS has been up to… 🧙‍♂️

Keeping up with AWS announcements is a full-time job in itself, never mind figuring out when CloudFormation adds support for a new feature. AWS CloudFormation: 2018 in review documents all the new features added to CloudFormation in 2018. And if you really want to stay current with new information, their release history page is always up-to-date.

Speaking of CloudFormation support, you can now Automate WebSocket API Creation in Amazon API Gateway Using AWS CloudFormation. Expect support in other serverless frameworks to be added soon.

Amazon SNS Message Filtering Adds Support for Multiple String Values in Blacklist Matching, which is actually much more exciting than it seems. Filtering messages at the broker level dramatically simplifies (and reduces costs for) pub/sub implementations. Having the ability to add several items to the blacklist is a very handy feature.

AWS also announced an open source project for Deploying a personalized API Gateway serverless developer portal. Using this project, you can make your API Gateway APIs available to your customers by enabling self-service discovery of those APIs. They can then use the portal to browse API documentation, get API keys, test published APIs, and monitor their own API usage. Another thing you don’t need to worry about. 👍

I’m not a .NET guy, so I didn’t even know there wasn’t support for this already. In any case, AWS X-Ray SDK for .NET Core is Now Generally Available, so good news for those utilizing that runtime.

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 Aleksandar Simovic (@simalexan). Aleksander is the co-author of Serverless applications with Node.js, a core team member for Claudia.js, and an AWS Serverless Hero. He has done a tremendous amount of work on Jarvis, an Alexa skill that allows you to create serverless applications using only voice commands, which is pretty cool. He also has 20 applications published to the Serverless Application Repository that you can use to get started with serverless quickly. Aleksandar continues to make valuable contributions to the serverless community, and we’re all lucky to have him!

Final Thoughts 🤔

There are so many amazing things happening with serverless right now, and this recent Berkeley paper is so incredibly encouraging. There is certainly a place for containers and servers right now, but it’s important to remember that today’s limitations are tomorrow’s opportunities, and the cloud providers all see the writing on the wall. Expect more and more advancements that address these limitations, and soon, serverless will in fact become, the default computing paradigm.

I hope you enjoyed this issue of Off-by-none. I love hearing feedback and suggestions so I can keep making this newsletter better each week. Feel free to contact me via Twitter, LinkedIn, Facebook, or email and let me know your thoughts, criticisms, or how you’d like to contribute to Off-by-none.

And don’t forget to share this newsletter with your friends and coworkers who are interested in serverless. I’d really appreciate it.

Until next time,
Jeremy

Off-by-none: Issue #23

The State of Serverless…

Welcome to Issue #23 of Off-by-none. It’s so great to have you all here! 🤗

Last week we looked at recent investments into the serverless ecosystem, highlighted some serverless events, and offered some thoughts for picking a database for your next project. This week we’re going to look at how we can use serverless to deal with third-party API quotas, watch some helpful videos, introduce “Serverless Stories”, and so much more.

It’s been another really busy week for serverless, so let’s get right to the good stuff. 🚀

When your third-party API imposes quota limits… 🙅‍♂️

In the serverless world, we often get the impression that our applications can scale without limits. With the right design (and enough money), this is theoretically possible. But in reality, many components of our serverless applications DO have limits. Whether these are physical limits, like network throughput or CPU capacity, or soft limits, like AWS Account Limits or third-party API quotas, our serverless applications still need to be able to handle periods of high load. And more importantly, our end users should experience minimal, if any, negative effects when we reach these thresholds.

One way in which our serverless applications can be limited, is when using third-party APIs that enforce quotas. In my new post, Throttling Third-Party API calls with AWS Lambda, we look at how we can use a combination of SQS, CloudWatch Events, and Lambda functions to implement a precisely controlled throttling system. We also discuss how you can implement (almost) guaranteed ordering, state management (for multi-tiered quotas), and how to plan for failure. Not only is this solution extremely robust and flexible, it’s also very cost effective (like < $2/mth).

When AWS has a slow week… 🐌

I’m sure the AWS teams are all working hard on their next big releases, but in the meantime, they managed to release a few interesting serverless-related updates.

Speaking of state management, AWS Step Functions are an excellent way to add orchestration to your serverless workflows. Now you can Develop and Test AWS Step Functions Workflows Locally, which is a pretty cool feature. Integration testing in the cloud is still necessary, but the more we can do locally, the better.

And for more local testing goodness, Amazon DynamoDB Local Added Support for Transactional APIs, On-Demand Capacity Mode, and 20 GSIs. For many of us that use DynamoDB, these features for the local version are a welcome addition. Uber cool feature: track and return the capacity units consumed by your queries. 👍

Not so serverless, but perhaps “server-less”, is the announcement that AWS Ops Automator v2 now features vertical scaling. Unfortunately, most of us still have to use servers for some of our workloads. But this new vertical scaling feature lets you increase instance sizes instead of simply adding more instances. Scaling up instead of scaling out can be much more cost effective (plus it uses Lambda to do the work 😉).

When you’re looking for innovations in serverless… 👩‍🔬

Epsagon introduced their new Issues Manager that allows you to easily track issues in your serverless applications, identify trends, and quickly jump to Trace Search to troubleshoot them.

IOPipe now enables auto-tracing of HTTP/S calls by default, giving you insight into what external (and internal) API calls are being made and how long they take. You can read all about this new feature at The Secret Life of HTTP(S) Calls in a Serverless World.

Braintree, the payments service, is Introducing Serverless Payment Functions. According to this, “developers will be able to use Braintree to write and deploy serverless functions to instrument their transaction lifecycles, enable 3rd party connections, hook into existing business processes, streamline data exports, and more, all via Braintree tooling.” Not quite sure how this will all work yet, but could be an interesting approach for other SaaS companies to allow for more seamless serverless integrations.

CloudFlare introduced the Workers Cache API, which now lets you modify the REQUEST and RESPONSE objects from within your workers. This is similar to the functionality that Lambda@Edge provides, which is very cool functionality for many use cases.

And Google announced that Cloud Firestore has gone GA. Cloud Firestore is Google’s answer to DynamoDB, but they’ve sprinkled in a handy little feature that lets you export data directly to BigQuery to do additional analysis. Nice way to reduce a data replication step.

What to do if you prefer Prime Video over the Kindle store… 🍿

Good news, the serverless community has been busy producing some really helpful and interesting video content.

Chris Munns and AWS take you on a Deep Dive into AWS SAM and the SAM CLI, plus another Deep Dive Into Lambda Layers and the Lambda Runtime API. Lots of great information packed into these sessions.

James Hood from AWS also shows us how to Accelerate Serverless Development Using AWS SAM & the AWS Serverless Application Repository. This is an excellent intro to Nested Applications, which can be a very handy feature.

Alex Ellis’ talk from GOTO 2018 is now available. Serverless Beyond the Hype is a great talk that starts by giving you an overview of the serverless landscape, and then gets into the nuts and bolts of what makes OpenFaaS different from alternatives such as Knative. If you’re a member of the “serverless on top of containers” crowd, you’ll enjoy this.

The team at Epsagon held a webinar with plenty of insights into Serverless Monitoring in Practice. Interesting look at how complex tracing can be, and what companies like theirs are doing to make it easier.

Our friend Marcia Villabla released two more re:Invent interviews. In the first interview she is Talking about Serverless with Forrest Brazeal, another AWS Serverless Hero and all around serverless expert. She then talks about building AWS communities with Martin Buberl.

I also discovered this site (thanks to Corey Quinn) that organizes a collection of AWS re:Invent videos and podcasts of past and current breakout sessions. Plus they’re searchable, which is really helpful. And if you missed re:Invent last year, you can sign up for the on-demand version of AWS Innovate re:Invent Recap 2018.

Where to look for some interesting serverless use cases… 🕵️‍♀️

I love seeing people apply serverless in new and interesting ways. Below is a handful of nifty little use cases that will hopefully inspire you to do something amazing. 😉

In Lord of the Patch — Story of the PatchBot, Vladyslav Cherednychenko from About You, explains how his team used AWS Lambda to automate vulnerability scans on their EC2 cluster.

Maxime Preaux built a simple Serverless Mailchimp Subscription service using Webtask.io, but you could easily apply this to other providers.

If you’d prefer that your applications do more listening, Apoorva Dave walks us through Building your own Alexa Skill from scratch. I think voice control is only going to become more prevalent, so my advice: start thinking about how your apps can leverage it to create better user experiences.

How to build a Serverless Twitter bot demonstrates another great serverless use case. Lorenzo Tenti builds one using the Serverless Framework, Python and Lambda. Bots are another useful tool when done correctly, and running them on serverless makes a whole ton of sense.

Maybe more of a tool rather than a use case, but Running Jenkins Pipelines in AWS Lambda is possible with a tool called Jenkinsfile-Runner-Lambda. This might be one of those square peg, round hole situations, but Carlos Sanchez points out that “it could make sense to run Jenkinsfiles in Lambda when you are building AWS related stuff.” Maybe, but I think the point is that Lambda is a potential fit for any type of automation.

Finally, Sam Breed (aka Baby Wolfman) created a Lambda WebSocket chess ♟ demo. Could your next MMO be 100% serverless? Might be worth thinking about.

When you’re looking for some encouraging Serverless Stories… 🏆

I’ve been speaking with several people lately about new voices in the serverless community. While I try to recognize people that create helpful content and companies that are innovating in the space, we tend to get stuck in our own echo chamber. This week I’m introducing “Serverless Stories” (or maybe Serverless Voices 🤔), that shares posts from people who are just starting out with serverless or have been adopting serverless in their organizations. I think there is a lot to learn from these folks, especially for those of us trying to foster and build the community. I’d love to know your thoughts on this.

My Serverless Story is a short read that outlines a developer’s foray into the serverless world. It’s interesting to hear their thoughts on the cost of API Gateway, the limited interfaces into managed services (as opposed to traditional methods), and how they believe that it’s not ready for latency-sensitive workloads.

Jordan Finneran wrote a post about Going Serverless where he discusses the migration of an Express.js app. Lack of tooling, reliance on a single provider, cold starts, and of course, event-driven architecture, are his top concerns.

In Lessons learned from launching TubeStats: a completely serverless service, Joshua Khan talks about the execution timeout limits of AWS Lambda functions and how they built their own state management component to overcome it. Interesting takeaway here: he didn’t use Step Functions for orchestration because of “unfamiliarity” and wanting to get “something launched” as soon as possible.

In part 2 of Dirty Old Code, Pierre Bails discusses the process his company used to move their monolithic Ruby on Rails application to a serverless infrastructure. Interesting step-by-step approach which could be a useful template for other companies looking to make the switch.

When you’re looking for some insights into the state of the serverless ecosystem… 📈

John Demian says that Businesses are overcoming challenges with serverless and that “2019 will be the year of serverless.” He points out that cost and speed of development continue to be the motivating factors for companies to push for adoption.

Likewise, TechRadar points out that 2019 will be A year of reckoning for digital transformation. Key takeaway here is the prediction that serverless will be central to a company’s success.

Then there are stories like this: Developers find cautious optimism for serverless platforms. There is a lot of FUD here that purports that tools don’t work as expected and that the developer learning curve is causing problems. 🤦🏻‍♂️

This doesn’t seem to be stopping investment into the space, however, especially since a new report says that Global Serverless Architecture Market Share will Hit USD 18.04 billion by 2024. Serverless is still new, and it has its share of challenges, but the market is growing, and every day implementation gets easier.

The 2019 Microservices Ecosystem by Tobias Kunze is a great read that outlines all the major players and gives some insights into how they all fit in to the larger ecosystem. Serverless is mentioned, of course, but the vast majority are supporting containers and other types of “server-full” approaches.

Why Amazon’s AWS Cloud Business Will Continue to Grow is another interesting piece that gives a bit of insight into AWS’s growth strategy. While they continue to grow their virtual machine business with EC2, they are also supporting container management, and obviously, serverless. More interestingly (which we saw at re:Invent), AWS is saying, “if you don’t want to come to the cloud, we’ll bring the cloud to you.” Support for On-prem, along with the multitude of other offerings, is helping to build up the cloud computing market for all providers.

And speaking of growing the cloud market, a recent piece titled Capital One’s public cloud strategy at odds with industry, points out the benefits of using a public cloud versus a private one. Perhaps most importantly for a bank, the combined security expertise of public cloud providers supplies the trust needed to let Capital One focus on other parts of their stack.

When you’re finally ready to abandon WordPress… 🤬

In case you missed it, generating static sites is all the rage nowadays, and for good reason. I’d venture a guess that 99.9999% of all website traffic are simple GET requests to essentially static pages. Serving those pages up from an edge location cache makes a whole bunch of sense. But whether you’re looking to go fully-static, or leverage new features to reduce your dependencies on servers, there are plenty of options available.

A Greater Gatsby: Modern, Static-Site Generation by Toby Fee answers all your Gatsby-related questions.

If you’re not ready to go fully static, try Going serverless with React and AWS Amplify. Peter Mbanugo walks you through creating a single page app that uses GraphQL to power your dynamic features.

Adam Henson points out that You Might Not Need Server Side Rendering. But what about SEO? Adam does a pretty good job answering why not.

On the other hand, Dan Quackenbush would probably disagree. He talks about how Caching SPAs for SEO with Lamdba@Edge actually increased their crawl rate by 900%.

And let’s not forget that AWS can help you move ALL THE WAY up the stack in some cases. So What AWS service should you use to publish a web site?  Adrian Hall might have the answer for you.

When serverless security shows up on your cloud audit questionnaire… 🔐

Chris Tozzi outlines some Serverless security best practices for cloud dev and ops teams. Pretty standard stuff, but it seems that best practices need to be repeated over and over again.

If you want a really in-depth look at serverless security, you can now watch the Foundations of AWS Lambda Security webinar that Ory Segal and I did, on-demand. Lots of really good stuff in there.

We talked about adding voice control to ours apps a bit earlier, but how do we secure those, especially if they control sensitive internal components?  Aravind Kodandaramaiah from AWS shows us how to Secure and distribute Alexa skills with Alexa for Business. Which, besides the security aspect, could also make for some great internal tooling for your business.

While this story isn’t about serverless, it is a cautionary tale about being a little too paranoid when it comes to security. Digital exchange loses $137 million as founder takes passwords to the grave is an example of failed redundancy. Be smart about your secrets management, even if you think you’re invincible.

When you need the right tool for your serverless job… 🔨

Remember that time you were asking for more serverless frameworks? Well, here you go. Meet TyX, a TypeScript-based serverless backend framework designed for deployment into AWS Lambda.

If you want some more TypeScript, try IFTO: A simple debugging module for AWS Lambda (λ) timeouts.

OPTASY points out the 6 Best Serverless Plugins to tailor the Serverless Framework to your project-specific needs.

If you’re using Lambda@Edge to do redirects, middy-reroute can make your life a lot simpler.

And if you need to debug your serverless applications, Yan Cui shows us how to do it with Dashbird.

StackShare announce their Top 50 Developer Tools of 2018. There were some nice serverless mentions in there including Architect, OpenWhisk, CloudFlare Workers and AWS CloudFront.

What to do if you’re an audiophile, but also love serverless… 🔊

A recent episode of the ThoughtWorks Podcast does some Diving into serverless architecture.  Mike Roberts offers some of his insights.

The Cloudcast: A Serverless Look Ahead for 2019 features special guest, Paul D. Johnston, chatting about the current state of serverless, how to economically think about functions, and areas where serverless needs to improve.

In Diving into Data with Amazon Athena, Simon Elisha shares how Amazon Athena can give you powerful SQL querying capabilities over text files in your S3 buckets. If you’re not familiar with Amazon Athena, you seriously need to check it out.

When you want to get hands-on with serverless tutorials… 👨🏻‍💻

Here is an insanely complete, and step-by-step guide to building a full-stack application using AWS Lambda and React-native.

Binaris also has a Full Stack Tutorial with Serverless & React that includes all the code you need to get up and running in no time.

Yan Cui offers a quick Lambda optimization tip that can speed up HTTP API calls from your serverless applications. TLDR; enable HTTP keep-alive.

For those of you that might be interested in Connecting to AWS DocumentDB from a Lambda function, this post will walk you through it in painstaking detail.

Step Functions can be a bit confusing, but in AWS Step Functions – Doing Serverless is Easier Than You Think, the team at Thundra gives you the all basics.

James Beswick teaches us How to add file upload features to your website with AWS Lambda and S3.

Richard Freeman, PhD, has a great tutorial for Building a Serverless Microservice CRUD RESTful API with MongoDB.

Another thing that can trip you up is Configuration management for serverless AWS applications. Marcin Z-Pa has some thoughts on how to make it easier for you.

If you’re a GitLab CI user, Forrest Brazeal will show you How to set up multi-account AWS SAM deployments.

And finally, if you’re interested in Migrating an Express App into AWS Lambda the Easy Way, this post will give you some practical tips.

Where to go for some interesting serverless reads… 📚

Finding Serverless’ Hidden Costs is an important reminder that pay-per-use can lead to costly mistakes if you aren’t properly monitoring your serverless functions.

In AWS SLA: Are you able to keep your availability promise?, Andreas Wittig show us how to use the new AWS SLAs to calculate our own SLAs. Key point is to make sure you account for other variables besides just AWS’s promises.

Debunking Serverless Tropes by Ryan Marsh has a bit of fun at serverless naysayers’ expense. It made me laugh. 😀

🔥 Multi-region serverless backend — reloaded by Adrian Hornsby is an updated version of his old post on the topic. This time he discusses how the new Global Accelerator service works to eliminate DNS caching for better DR. Highly recommended read for anyone building out a serious, highly-available serverless application.

Raoul Meyer’s AppSync: Basically GraphQL as a service, is a good overview of what AppSync is and provides a few examples to help you get your head around it.

The Top 7 Takeaways from our 2018 Serverless Shows is a look back at Protego’s podcast episodes from last year. They had some great guests with some very good insights.

Nuweba published their Top Serverless Resources You Should Know About. A good list for those interested in staying current with what’s happening in the serverless world.

In Why DevOps Engineers Love AWS Lambda, Ran Ribenzaft from Epsagon gives us a number of great Lambda use cases for automating DevOps processes. These types of practical use cases are a great way for companies to get started with serverless.

Think you can run Kubernetes better than a cloud provider? Think again. Matt Asay argues that building your own Kubernetes cluster is a waste of valuable time. This is based off of a great Twitter thread from Ben Kehoe.

On Infrastructure at Scale: A Cascading Failure of Distributed System by Dan Woods, isn’t really about serverless, but I thought it highlighted some interesting challenges that arise from running distributed systems.

When you want to try something other than AWS… 🤷‍♂️

Ride the Serverless Wave with DigitalOcean’s One-click Droplet shows you how to get OpenFaaS up and running in DigitalOcean with just one click (sort of).

Azure Functions now has moves like Swagger (sorry, bad joke). Introducing Swagger UI on Azure Functions show you how to use a few services to generate your own API docs.

The Mixology Playbook: Kubernetes and Serverless is a well-written piece that talks about the values of a hybrid approach. While I believe there is room for a lot of players at this point, I think serverless (in whatever form it ends up taking) will ultimately win the war.

Hey Google, help me use Cloud Functions is another piece that points out how voice automation could be used to enhance a user experience. Susie Coleman works for the Guardian’s Voice Lab, which is trying to bring the “Guardian’s voice” to Google Assistant. If you’re not thinking about voice automation for your app, you might miss out on a huge opportunity.

Anchal Bhalla teaches you how to Build a Serverless App with Facial Recognition using IBM Cloud Functions. Simple tutorial, but it shows you how powerful some of this stuff is.

And last but not least, Simona Cotin shows us how to use the Azure Resource Manager to write Infrastructure as code for Serverless APIs using just a bit of JSON.

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 James Beswick (@jbesw). James is a developer, author, AWS-Certified builder, and cofounder of Indevelo, a consulting firm that builds products on AWS. He’s also a speaker, a blogger, and an active member of the serverless community. He recently launched Ask James About AWS, a video series that walks you through a number of common AWS tasks. Through his writings, videos, and talks, James is helping to spread the benefits of serverless, as well as providing useful insights and education to those looking to adopt the cloud. Thanks for what you do, James!

Final Thoughts 🤔

I’ve had a number of really interesting talks with people over the last few weeks about the overall state of serverless. There is a tremendous amount of innovation, lots of great use cases emerging, and new people joining the community every day. However, we have a long way to go before serverless becomes top of mind. We need to continue to encourage collaboration between everyone in this space so that we can educate and spread the word.

Speaking of spreading the word, there are a number of ServerlessDays events coming up that are a great way to support and expand the community. ServerlessDays Boston just announced an amazing speaker lineup, and Hamburg and Austin are right around the corner. I hope you all get a chance to attend one of these events.

I hope you enjoyed this issue of Off-by-none. I love hearing your feedback and suggestions, it helps me make this newsletter better each week. Feel free to contact me via Twitter, LinkedIn, Facebook, or email and let me know your thoughts, criticisms, or how you’d like to contribute to Off-by-none.

Take care,
Jeremy

Throttling Third-Party API calls with AWS Lambda

In the serverless world, we often get the impression that our applications can scale without limits. With the right design (and enough money), this is theoretically possible. But in reality, many components of our serverless applications DO have limits. Whether these are physical limits, like network throughput or CPU capacity, or soft limits, like AWS Account Limits or third-party API quotas, our serverless applications still need to be able to handle periods of high load. And more importantly, our end users should experience minimal, if any, negative effects when we reach these thresholds.

There are many ways to add resiliency to our serverless applications, but this post is going to focus on dealing specifically with quotas in third-party APIs. We’ll look at how we can use a combination of SQS, CloudWatch Events, and Lambda functions to implement a precisely controlled throttling system. We’ll also discuss how you can implement (almost) guaranteed ordering, state management (for multi-tiered quotas), and how to plan for failure. Let’s get started!

Continue Reading…

Off-by-none: Issue #21

The serverless takeover…

Welcome to Issue #21 of Off-by-none. I hope you’re ready to talk serverless! 😃

Last week we got hands-on and learned how to handle “not-so-scalable” systems in our serverless applications. This week we look at some more ways to scale your serverless apps, highlight some recent innovations, examine how serverless and the cloud is affecting the IT landscape, and so much more.

Lots to get to, so let’s jump right in! 🏊‍♂️

When you’re trying to get your serverless application to scale… 📈

Mikhail Shilkov has a brilliant post titled: Serverless at Scale: Serving StackOverflow-like Traffic. In this post he runs experiments across AWS, GCP, and Azure, to test how serverless functions and blob-storage scales to 1,000 requests per second. The results are quite fascinating.

We often talk about scaling “non-serverless” downstream systems in this newsletter, and Tirumarai Selvan has presented us with another option for Scaling RDBMS for GraphQL backends on serverless. Connection management is an ongoing problem with serverless functions. AWS is working to fix this with their Data API for Aurora Serverless (and of course there’s my serverless-mysql package), but overall, not a bad (albeit, non-serverless) approach.

Paul Johnston has some thoughts on Serverless Compute and Serverless Data. It is an interesting way to compartmentalize serverless applications. Without the proper design, ephemeral compute is certainly limited by the underlying datastore. Designing for scale is the new default, and this is a skill that many developers have never really needed to worry about.

Tim Bray started this thread on Twitter that goes deep into microservices and temporal coupling through synchronous communication. 🤓 I love these types of discussions, especially when Marc Brooker and Sam Newman jump in.

And James Thomas tells us about loosely-coupled serverless functions with Apache Openwhisk. Good read that looks at the difference between triggers and queues and how they can affect the scalability of your severless application. A bit specific to Openwhisk, but I think the general concepts are quite universal.

When people are having way too much fun with custom runtimes… 👩‍💻

Danil Smirnov shows you how to access the latest JavaScript SDK from Lambda functions using Layers. You might think that AWS would keep this updated, but you’d be wrong. I ran into this problem a few times, which means you must package the aws-sdk with your Lambda functions. This way is much better. 👍

The team over at Thundra developed their own Node.js Custom Runtime to let you monitor your Lambda functions without making any changes to your code. We’ve seen this type of use case before, but Thundra went the extra step to show us how they actually built it.

Have you ever wondered how to run Elixir on Lambda? Me neither, but Arjan Molenaar has figured it out for us just in case. Building an Elixir runtime for AWS Lambda gives you a brief overview of his motivations, and ultimately leads you to the GitHub repository if you’d like to try it yourself.

And PHP fans can also rejoice! Bref, a serverless framework for PHP, is incorporating a custom PHP runtime into v0.3. Look forward to better performance, PHP-FPM support, and local development with Docker and AWS SAM.

Where to look for serverless events… 🗓

ServerlessDays Cardiff is coming up on January 30th. Tickets are still available, so if you’re going to be in the area, I’d highly suggest you attend. Can’t go wrong with talks from the likes of Yan Cui, Simona Cotin, the Ian MassinghamSlobodan Stojanović and so many more.

And if you’re state-side, ServerlessDays Boston is coming up on March 12th. We just announced the one and only Charity Majors as our opening keynote speaker. And I’m happy to announce that the, wait for it… legendary Chris Munns from AWS will be giving the closing keynote. The remaining speakers will be announced early next week. This is going to be good. 🙌

If you’re looking for something a bit more remote-friendly, Stackery has some upcoming serverless webinars that you can join. They’ll walk you through how to build your serverless applications without needing to write a bunch of YAML.

Feel like doing some traveling? Thundra put together a great list of Serverless Events You Should Be Aware Of in 2019. I’m going to try and get to a few of these myself.

For those of you that are visual learners… 👀

I stumbled across some videos that Cloud Path had created, and I was impressed with how well-produced they were. In AWS S3 & AWS Lambda Integration, they walk you through setting up an S3 trigger and the code required to process the event. Beginner level stuff, but I’m going to keep my eye on this channel.

Marcia Villalba dropped another re:Invent interview where she’s Talking about testing Serverless applications with Slobodan Stojonovic. Slobodan was our very first Serverless Star at Off-by-none and is an awesome serverless resource.

If you can’t get enough of Marcia, check out her Getting ready for AWS reInvent 2018 vlog series. If you’re thinking about going to re:Invent this year, these videos provide a first hand look at this amazing experience.

CloudFlare workers are a relatively new addition to the serverless ecosystem, and they’re quite passionate about how this type of edge computing could change how applications run. How Serverless Platforms are Changing to Enable New Applications is a talk by Zack Bloom that digs deep into this concept.

What to do if you’ve been ignoring serverless security and user privacy… 🔒

If you thought that you didn’t need to worry about GDPR, think again. It was just reported that France fined Google nearly $57 million for an alleged violation. Now this might just be France being France, or it’s a sign of things to come. If you’re not familiar with GDPR, or you’ve already forgot the requirements, Stripe has a great guide to help you out. C’est la vie. 🇫🇷

Last time I’ll mention this (promise). Ory Segal and I are hosting a Foundations of Lambda Security webinar on January 24, 2019 at 11am ET. It will be packed full of practical serverless security advice including risks associate with AWS Lambda, IAM permissions, governance and regulatory compliance, and scalability.

When you’re looking for innovation in the serverless ecosystem… 🔍

Epsagon continues to make serverless observability easier with the introduction of Trace Search. This is a very cool feature that lets you find and drill down into traces using a bunch of different filters. Plus they have created plug-in packages to make integrating tracing and cleaning up your old Lambda versions much easier.

But serverless observability and tracing is a hot space to be in, and Adam Johnson and the team over at IOpipe has their own long list of accomplishments and future plans. In Auld Lang Servers, Adam outlines IOpipe’s milestones and innovations over the last year. Their product continues to get better and better, giving serverless practitioners plenty of options when choosing an observability tool.

And don’t count out OpenWhisk. Release 0.17.0 (18.01.2019) of the Serverless Framework OpenWhisk plugin was recently released, with added support for concurrent actions, which should speed up your deployments.

When you find out that Google Cloud Functions finally supports Go… 🤷‍♂️

Google announced that Go 1.11 is now a supported language for Google Cloud Functions. You’d think that since they invented it, they might have beat Amazon to the punch. Oh well, at least GCP is still innovating its serverless offerings.

Not to be outdone by AWS’s classic serverless example, Adil H has put together a post showing us how to do Image Resizing with Go and Cloud Functions. Code included.

If you’re looking to push the envelope a bit more, Saurabh Deoras has a great article on combining TensorFlow, Go and Cloud Functions. I like when people experiment with stuff like this, and even though his final solution isn’t ideal, it still works. He even waxes-poetic at the end. #deep

When the zombie apocalypse might not be the apocalypse you need to worry about… 🧟‍♂️

Forrest Brazeal wrote a rather depressing (but necessary) piece about the The Creeping IT Apocalypse. With AWS reportedly working on a secretive low-code/no-code project, there is an entire class of engineers that could get automated out of existence. TLDR; learn to code and keep your skills current.

Along the same lines, James Beswick’s latest post, The cloud skills shortage and the unemployed army of the certified, comes at it from a slightly different angle. Of course IT head counts are dropping because of automation, but James argues it isn’t just about keeping your skills current. It’s about the unreasonable expectation that a single developer must now do the jobs of what used to require several highly-specialized people to do. TLDR; become a coding superstar.

Other people are writing about this trend, perhaps without even realizing it. Nader Dabit gives his take on what it means to do Full-Stack Development in the Era of Serverless Computing“This means you basically have a team of specialized engineers that have built out and iterated on something that you or your team simply could not do alone without investing an impractical number of hours.” I think this type of innovation is great, but don’t get caught watching shadows on the wall, this type of undifferentiated development work is going away. Now look who’s being poetic. 😉

When you really like seeing serverless use cases… 🤗

I think we are all in agreement that CloudWatch is not the best place to be digging into our application logs. There are plenty of options out there, but the team at BBC iPlayer shows us how they put Lambda Logs in ELK. It’s a DIY option, but highly effective for their needs.

This is a bit of an old post, but in How I export, analyze, and resurface my Kindle highlights, Sawyer Hollenshead show us how he created a serverless pipeline that extracted his highlights, analyzed them with NLP, and published them to his site to reflect on what he read. Pretty interesting use case, IMO.

Gavin Lewis shows us How To Build a Serverless CI/CD Pipeline On AWS. There is quite a bit of complexity to his approach, but he has it all laid out for you.

When you’re a big fan of the horror genre… 👹

Henning Jacobs has compiled a list of wonderful Kubernetes Failure Stories for us. He claims that these stories “should make it easier for people dealing with Kubernetes operations… to learn from others and reduce the unknown unknowns of running Kubernetes in production.” I say it’s just another opportunity for serverless fans to say I told you so 😂. But seriously, if you want to take a stab at Kubernetes, this is a good list to get you started (or maybe scare you away).

Corey Quinn recounts a horror story of his own in this Twitter thread. The story of an ambitious young man trying to set up his own infrastructure in a shared datacenter goes horribly awry, hilarity ensues. I remember these days myself, but now that the cloud is here, this type of tragedy can easily be avoided.

Where to go for some more serverless reading… 📚

Chris Feist wrote a post called Making serverless variables work for you to accompany his new serverless-plugin-composed-vars plugin for the Serverless framework. I do this a bit differently, but this looks like a handy plugin.

Migrating a Serverless application backend to the Serverless Framework highlights Tai Nguyen Bui’s journey moving away from the console and into the world of serverless deployment automation.

Speaking of serverless journeys, How I Got Comfortable Building with Serverless highlights how Jun Fritz went from code bootcamp graduate, to Stackery employee, to confident serverless builder in just a few months. There is still much to learn, but it is fascinating how quickly people can get things up and running.

The state of serverless: 6 trends to watch highlights a fairly obvious (IMO) evolution of any new technology. However, I think that betting Knative will drive standardization is a bit off. We can argue about what serverless means all day long, but with CloudFlare workers moving compute to the edge, and AWS loading VMs closer to the metal with Firecracker, I personally see anything that adds more layers of abstraction to ephemeral functions being a step in the wrong direction. Maybe it’s just me.

In Dear Go — Thank You For Teaching Me PHP Was A Waste of My Time, Vern Keenan is pretty harsh about the future prospects of PHP. Not sure I agree with him on that, but he does make some good points about Go potentially becoming the dominant serverless runtime.

And finally, Zac Charles asks, What happens to running threads when a Lambda finishes executing? If you’re interested in the inner workings of Lambda functions and container reuse, give this short article a read.

When you’re curious what AWS has been working on… ☁️

There were a lot of serverless announcements and innovations at AWS over the last few months. If you’re having a hard time keeping up, take a look at Eric Johnson’s full recap: ICYMI: Serverless Q4 2018

The new AWS Backup lets you automate and centrally manage your backups across AWS services. Jerry Hargrove (aka @awsgeek) wasted no time putting together a cloud diagram for you. He’s also got a great one for the new Amazon DocumentDB service as well.

AWS also added S3 as a deployment action provider in CodePipeline. Check out this tutorial to learn how to Create a Pipeline That Uses Amazon S3 as a Deployment Provider. Plenty of cool use cases with this.

Two weeks ago AWS announced that AWS Step Functions would support resource tagging. Now they’re getting their very own Service Level Agreement with three 9s.

And Step Functions isn’t the only one getting SLAs. Amazon announced 99.9% Service Level Agreements for Amazon Kinesis Data Streams and Amazon Kinesis Data Firehose.

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 Mikhail Shilkov (@MikhailShilkov). Mikhail is a Microsoft Azure MVP, a frequent conference speaker, and an advocate for all things serverless. His blog is loaded with insanely thorough articles about serverless (and functional programming) that are sure to help you level up your own skills. He mostly focuses on Microsoft, but has articles like this and this that can give you some much needed perspective in the overall serverless ecosystem. And today is his birthday, so Happy Birthday, Mikhail, and thanks for what you do! 🎂🎉🎈

Final Thoughts 🤔

Thank you for all the responses from last week. Everyone that sent me a message said they like the length and that they found it easy to skim and pick out the articles they were interested in. I’m glad you all like it. If you have any other thoughts, I’d be happy to hear them.

I hope you enjoyed this issue of Off-by-none. I love hearing your feedback and suggestions, it helps me make this newsletter better. Feel free to contact me via Twitter, LinkedIn, Facebook, or email and let me know your thoughts, criticisms, or how you’d like to contribute to Off-by-none.

Take care,
Jeremy

Off-by-none: Issue #20

Let’s get hands-on…

Welcome to Issue #20 of Off-by-none. It’s great to have you here! 🤘🏻

Last week we sifted through quite a bit of serverless content to start the new year. This week we’re going to get a bit more hands-on, and dig into some useful applications of serverless that we can start using right now. We also have some more insights into the future of serverless, plus some really compelling research regarding TCO of serverless infrastructures.

We’ve got a bunch of stuff to get to today, so let’s get into it! 👇

When your downstream systems aren’t infinitely scalable… 😳

There is an ongoing debate about the “serverlessness” of certain services and downstream systems. While that may be a useful exercise from an operational perspective, from a practical standpoint, the bigger issue has to do with scalability. It is likely that most of the services that make up your serverless applications will not scale as well as Lambda. This can create significant pressure on downstream services during heavy traffic spikes, sometimes resulting in unplanned downtime. So what can we do when certain parts of our application simply can’t scale?

An extremely useful pattern is to distribute an event to one or more SQS queues using SNS. This gives us the ability to use multiple queues to “buffer” events so that we can throttle processing to alleviate pressure on downstream resources. For example, if we have an event that needs to write information to a relational database AND trigger another process that calls a third-party API, this pattern would be a great fit.

In my new post, How To: Use SNS and SQS to Distribute and Throttle Events, I walk you through how to automate this and add it to your serverless applications. Full working code examples are provided and explained, so give it look, and see if this would be right for your application.

When you want more serverless use cases… 🙋‍♀️

Last week I shared some interesting serverless use cases that I came across. I think it’s helpful to see how other people are using serverless, and then be able to apply some of those ideas to your own systems. Here are a few I found this week.

Creating A Serverless Answer For eCommerce  shows us how a team created a completely serverless ecommerce system and the resulting benefits. The quote at the end of the article may seem a bit obvious to those of use who live and breathe serverless, but it sums up the business case quite nicely: “By moving to a Serverless solution, businesses can achieve an affordable solution that will rapidly scale up and down with demand, removing wasted resources and expenditure during down times, while ensuring you’re able to handle larger peak volumes whenever they occur.”

Bob Thomas shows us how and why KYD joined the serverless train. There are some great insights into why they went serverless as well as some code examples for CI/CD with Gitlab.

There are plenty of third party ESPs to choose from, but Vinicius Kiatkoski Neves gives us a complete walk-through and shows us how to send e-mails through AWS SES and Lambda.

When serverless security should be your #1 concern… 🔒

Marcia Villalba is back with another great interview from re:Invent. This week she is Talking about Serverless Security with Ory Segal.

Speaking of Vegas and serverless security, I came across this talk from Erez Yalon at BSides called Serverless Infections. It has some really good security tips in there, plus there are some demos that show how hackers can both infiltrate and exfiltrate your serverless functions.

And don’t forget that Ory Segal and I are hosting a Foundations of Lambda Security webinar on January 24, 2019 at 11am ET. Make sure you signup to see how the OWASP Top 10 applies to your serverless applications.

When you want to build serverless apps on something other than AWS… ⚡️

I’m a big AWS fan, and with 70% of the serverless market, it’s hard to ignore. But others continue to make strides in the space, and lots of developers are utilizing the service offerings of other cloud providers. Here are few interesting resource I came across this week that do serverless sans AWS.

Serverless Notes is a site dedicated to helping developers build applications on Azure. They’ve recently launched there Azure Serverless Tips series with helpful bits of information from technology leaders and experienced people, all in one place.

Another great resource is the Azure Serverless Community Library. Think of it a bit like the AWS Serverless Application Repository. I browsed through these and there are A LOT of covered use cases already built for you.

And if you’re using the Microsoft cloud and you need to Scale Azure Functions to Make 500,000 Requests to Weather.com in Under 3 minutes, David Barkol has you covered.

And let’s not leave Google out! Wassim Chegham wrote a great post called Building Your Next Serverless Application: The Complete Guide. It is an in-depth, step-by-step, code included walk-through that’s a great resource for those working in the Google Cloud.

When you think about the future of serverless… 🔮

Nate Taggart from Stackery has some predictions for Serverless in 2019. According to him, we can look forward to monolith conversions and executive buy-in, but will face resistance from the IT-Industrial complex.

Ben Moore from ChannelLife New Zealand reports that KBV research predicts the Serverless architecture market to reach $14B by 2024. That’s a compound annual growth rate of 23.4%. 🐨

Adrian Colyer has some thoughts on the Serverless computing: one step forward, two steps back paper that was released recently. Lots of us saw the paper as highly critical of serverless, especially since it focused on use case that were not a good fit. Adrian has a bit of a different perspective on this.

And whenever we look at the future, it’s always helpful to take look at the past. Our friends over at Thundra have a nice post that recaps their journey in 2018. It is really exciting to see companies in the serverless space growing up and being successful. There are so many opportunities in the serverlesss space, and Thundra is just one example.

When you’re finally thinking about migrating to serverless… 🤷‍♂️

Ready to move all your applications to a serverless architecture? Yan Cui says Not so FaaS! He points out that there are lots of viable use cases for serverless, but that user experience should trump everything else. TLDR; don’t try to fit a square peg into a round hole, even if the square peg is serverless. 😜

The team at Nuweba has put together a serverless ebook to help you understand The Top 4 Challenges In Serverless. Handy little guide if you’re new to the serverless world.

There’s also an interesting interview with Red Hat’s Michael Hausenblas on learning to walk before running into a Serverless mess. There are some good points in here about the operations culture changing as well as pointing out a few places where serverless might not make sense.

And if you are planning on going serverless, the biggest culture shock will most likely be with observability, or the lack thereof. The team over at Epsagon has an upcoming webinar that will explain Serverless Monitoring in Practice. Definitely worth a look.

What to do if you can’t let go of your Ruby or PHP framework… 👋

Are you a Ruby on Rails developer that is feeling left out by this whole serverless thing? Check out Jets: Ruby Serverless Framework, and see if that gets you excited.

What about all the PHP fans? I’ve heard that Laravel is doing some work to make the framework more serverless, but in the meantime, Rob Allen will show you how to run Serverless PHP on AWS Lambda. AWS also has a post that can help you as well.

When you’re curious if serverless will actually reduce your costs… 💰

Remember that Serverless computing: one step forward, two steps back paper that we previous mentioned? Well it also got Yan Cui fired up. He tells us why You are thinking about serverless costs all wrong and points out that TCO (total cost of ownership) is the better metric to evaluate costs.

Kevin O’Hara shared a typical #AWS bill for a startup building their MVP primarily on serverless technology like Lambda. Production APIs, static sites, databases, and messaging all for under a few bucks a month. This is not uncommon.

Mark Schwartz had some recent thoughts on Switching Costs and Lock-In that are worth reading. However, the new Generating Value Through IT Agility and Business Scalability with AWS Serverless Platform report is definitely worth a skim. Some of the highlights include a 33% increase in developer productivity, 18% increase in applications/logic created, and an over 200% increase in the number of features. Add to this massive drops in unexpected downtime and MTTR, 60% lower operations costs, and a 53% reduction in infrastructure and hardware costs over a five year period. This is some great data if you’re trying to make the serverless case to the higher-ups.

When you’re looking for some interesting serverless reads and resources… 📚

Your Quintessential Guide to AWS Athena is just that. No need to be paying for RedShift if you store your data correctly in S3.

Mike Roberts and John Chapin over at Symphonia created a lambda-benchmarking project that generates and saves benchmarks for cold start latencies of the AWS Lambda service. It will be really interesting to see these latencies decrease as AWS continues to optimize for them.

And Ray Camden has a new article about Adding Serverless Functions to Your Netlify Static Site. I think I’ve read most of Ray’s books, so it will be awesome if he becomes a serverless advocate too!

When you get overly excited about AWS announcements…🗣

There was an AWS Fargate Price Reduction – Up to 50%. This is thanks to the Firecracker virtualization technology they announced at re:Invent last year. Good news for those of you that still need containers.

AWS also announced Amazon DocumentDB (with MongoDB Compatibility). I wouldn’t suggest building greenfield on it, but if you are moving an existing workload, this could make your managing a MongoDB cluster nightmares go away.

Speaking of migrating MongoDB, AWS Database Migration Service Now Supports Amazon DocumentDB with MongoDB compatibility as a target. Live migrate right from your replica sets or sharded clusters.

And AWS Step Functions Now Supports Resource Tagging, which is pretty cool. The more you tag the better. Read How To: Tag Your Lambda Functions for Smarter Serverless Applications for a bunch of reasons why.

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 Heitor Lessa (@heitor_lessa). Heitor is a Specialist Solutions Architect at AWS that focuses on serverless. Beside being an all around nice guy and serverless expert, Heitor is the host of the Build on Serverless Twitch series. The first season featured a number of great guests with lots of hands-on, real-world serverless problem solving. Season 2 is in the works, so be sure to RSVP so you can learn more best practices while watching Heitor and his guests build a Serverless Airline App from scratch. Great stuff!

Final Thoughts 🤔

I realize that this newsletter keeps getting longer every week. Maybe I’m looking too hard for serverless content, or maybe there is just a lot more of it out there. Either way, I feel like it is getting a little unwieldy. There is obviously a lot of information to share each week, but I don’t want it to be too overwhelming. Should I cut this down a bit? Do you like all this content? Should I add more!? I’d love to hear your thoughts on it.

I hope you enjoyed this issue of Off-by-none. Please send me your feedback and suggestions so I can continue to make this newsletter better. Feel free to contact me via Twitter, LinkedIn, Facebook, or email and let me know your thoughts, criticisms, or how you’d like to contribute to Off-by-none.

See you next time,
Jeremy

How To: Use SNS and SQS to Distribute and Throttle Events

An extremely useful AWS serverless microservice pattern is to distribute an event to one or more SQS queues using SNS. This gives us the ability to use multiple SQS queues to “buffer” events so that we can throttle queue processing to alleviate pressure on downstream resources. For example, if we have an event that needs to write information to a relational database AND trigger another process that needs to call a third-party API, this pattern would be a great fit.

This is a variation of the Distributed Trigger Pattern, but in this example, the SNS topic AND the SQS queues are contained within a single microservice. It is certainly possible to subscribe other microservices to this SNS topic as well, but we’ll stick with intra-service subscriptions for now. The diagram below represents a high-level view of how we might trigger an SNS topic (API Gateway → Lambda → SNS), with SNS then distributing the message to the SQS queues. Let’s call it the Distributed Queue Pattern.

Distributed Queue Pattern

This post assumes you know the basics of setting up a serverless application, and will focus on just the SNS topic subscriptions, permissions, and implementation best practices. Let’s get started!

Continue Reading…