Off-by-none: Issue #41

June 11, 2019

Switching to DynamoDB in 20 Easy Steps… πŸ˜‰

Welcome to Issue #41 of Off-by-none. I’m so happy you’re here! πŸ˜€

Last week, we discussed AWS’s new “serverless” way to access your MySQL databases, plus I shared my new Data API Client library that makes working with the Data API even easier. This week, we see what happens when you offer some DynamoDB advice that resonates on Twitter, plus we look at several great serverless stories, and share a boat load of awesome content from the serverless community.

Lots of great stuff happening in the serverless world, so let’s get right to it! 🚀

When you want to switch from RDBMS to DynamoDB… πŸ‘¨πŸ»β€πŸ’»

If you’re a regular reader, or you follow me on Twitter, you’ve probably noticed that I advocate for using DynamoDB, while at the same time, still building tools to support using RDBMS solutions with serverless. There are two very important reasons for this.

First, the vast majority of my existing workloads are built using MySQL backends. I have neither the time, nor the inclination, to rewrite these to use a different database. However, I have moved several of my compute requirements to Lambda, so interacting with MySQL is an absolute must. Second, DynamoDB isn’t right for every application. While I often start with DynamoDB as my new default, sometimes I still have use cases that require (or at least fit better into) MySQL.

There are a lot of factors that go into choosing NoSQL over RDBMS, but the first step in understanding that choice, should be getting to know what NoSQL (and specifically DynamoDB) is capable of. I posted a thread to Twitter last week that outlined 20 “easy” steps to switch from RDBMS to DynamoDB. It apparently resonated with quite a few people, so upon request, I turned it into a blog post. Give it a read, and see if it convinces you to give DynamoDB a try.

Serverless News & Product Announcements πŸš€

Qubole launches Quantum, its serverless database engine
This looks really interesting. The data sits on AWS, and you can query it using a high-performance SQL engine. I’m curious how this compares to Athena.

Meet the Newest AWS Heroes! June 2019
Welcome to the new AWS Heroes! There is a good batch of people in here.

Epsagon Achieves the AWS Data & Analytics Competency Status
This designation recognizes that Epsagon has demonstrated success in helping customers evaluate and use the tools, techniques, and technologies of working with data productively, at a high scale, to successfully achieve their data and analytics goals on AWS. Good for them!

AWS goes live with Windows containers… but contain yourselves: It’s going to be niche
Remember that time we wanted to run Windows containers? Me neither, but I’m sure this is super exciting for people who love operational complexity. 😜

Bref is backed by null, the company
Maintaining open source projects is a huge time commitment, but it looks like Matthieu Napoli has found a way to keep building Bref (an open-source project for PHP).

Serverless Stories πŸ“–

Creating Asynchronous Serverless APIs with AWS AppSync
Very cool implementation by Nordcloud Engineering that uses AppSync subscriptions to create a better UX for a RedShift-backed datastore.

Moving Faster With AWS by Creating an Event Stream Database
The team at Nike Engineering came up with an incredibly creative (and cost effective) way to use Kinesis Firehose, S3, and Athena, to build a high-volume event stream. Great solution for getting around the limitations of other services.

AWS Summit London case study: Going Serverless at Comic Relief
Caroline Rennie adds some more thoughtful information and advice to her AWS Summit London presentation.

Serverless Event Sourcing
Eric Li from OfferUp outlines how his team used event sourcing with DynamoDB and streams to create their new shipping feature.

Serverless is easier than you think
Tai Nguyen Bui from the Agile Monkeys explains how and why they built the Made For Serverless site.

Deduplicating Amazon SQS Messages
Ross Rhodes shows how his team solved the duplicate message problem using DynamoDB. This could also possibly be solved by using DynamoDB streams to enforce uniqueness.

Serverless Use Cases πŸ—Ί

Tracking software licenses with AWS Service Catalog and AWS Step Functions
Here’s an interesting little use case that uses CloudWatch Logs, Lambda and DynamoDB to automatically keep track of license utilization and notify administrators when the utilization increases.

Building a DIY ADHD Medication Reminder with Azure Functions & Twilio
Simple, but straightforward use case to automate your life. This is one of those “infinitely small” use cases for serverless, which can help you automate things without needing to deploy infrastructure to do it.

Feature Toggling and A/B Testing with React
These are two very standard use cases for any web application. Follow BJ Clark’s advice, or put these in CloudFront with Lambda@Edge and up your serverless game.

100% Serverless Asynchronous API with APIG, SQS and Lambda
Asanka Nissanka outlines a very good method for using AWS Service Integrations to route traffic from API Gateway directly into an SQS queue. There is very little transformation happening here, and removing Lambda from the equation is fairly easy, and will be faster and cheaper.

If you’re thinking about going serverless… πŸ€”

Avoiding an Organizational Cold Start
Migrating your enterprise to serverless has a number of benefits, but Adam Johnson outlines three things that enterprises need to be aware of when making the switch.

WTF is Serverless?
I’m not sure we need another one of these posts, but Adam Berlinsky-Schine does give some good history in this one. Definitely don’t agree that it’s “possible that serverless is a passing fad”, but maybe I’m just a bit biased. πŸ€·β€β™‚οΈ

10 things to know about serverless computing β€” before you make the leap
There are plenty more things you might want to know, but Rahul Sharma captures a few of them for you in this post.

Are you ready for serverless development?
Uri Parush from Lumigo recounts his foray into serverless and how he had to learn to think differently about building applications.

Serverless Basics and Best Practices… βœ…

AWS Lambda Timeout Best Practices
Rajesh Bhojwani outlines some common timeout scenarios with AWS Lambda and how you can monitor and deal with them.

alias cicd=’sam deploy’
Richard Boyd goes all literal on us and takes issue with some of the Serverless Application Model’s (SAM) semantics. He’s totally right though, CI/CD is the preferred way to deploy your production applications.

Understanding AWS Cognito and IAM Roles
User pools, Identity pools, and IAM roles to share access to AWS resources. A comprehensive walkthrough with common use cases and code samples.

AWS Step functions and Lambda
Sanket Bengali may have gotten a little overzealous with CMD+SHIFT+4, but this post is chockfull of screenshots to run through the basics of Step Functions.

Reproducing the β€˜SQS Trigger and Lambda Concurrency Limit’ Issue
Zac Charles outlines how to break SQS Triggers with Lambdas every time. I mistakenly thought he was mistaken, until I responded, and realized that I, in fact, mistook his mistakeness for intentionally being mistaken. πŸ€¦πŸ»β€β™‚οΈ

Serverless Tutorials πŸ—

Deploying Lambda Function GraphQL Resolvers
The Amplify CLI recently added support for deploying Lambda GraphQL resolvers directly from your Amplify environment. Nader Dabit gives you an in-depth look at how to take advantage of this cool new feature.

How to get near-realtime logs for a Terraform-managed Lambda function
If you’re using Terraform to manage and deploy Lambda functions, I would suggest switching to the Serverless Framework or SAM. If that’s not an option, then maybe TamΓ‘s Sallai post will make your life easier.

Build a real-life serverless app with AWS Amplify
Thomas Bouron shows you how he built an app for his wife’s travel company using AWS Amplify and DynamoDB. Nice use of GIFs as well. πŸ‘

Build a voting website that doesn’t crashβ€Šβ€”β€Špart two. Now with Amplify.
James Beswick is back with another excellent post that shows us some of the basics of Amplify and how we can use it to create powerful SPAs.

β€ŠCreate Lambda Layers with Serverless Framework and Offline support
In part 2 of Dhaval Nagar’s Lambda Layers series, he shows you how to develop and test Lambda Layers using the Serverless Framework.

Sorting Queries with AWS Amplify’s Key Directive
Jan Hesters teaches you how to sort your GraphQL queries in AWS Amplify using the @key directive.

Serverless Security πŸ”’

How to securely provide database credentials to Lambda functions by using AWS Secrets Manager
Ramesh Adabala shows you how to secure your credentials in Lambda functions without hardcoding the secrets in code or passing them through environment variables.

Keeping the Security and Scalability of Serverless Apps Problem-Free with AWS Secrets Manager
Chase Douglas from Stackery outlines a similar method to Ramesh, but focuses more on the permissions and ongoing management of your secrets.

10 Serverless security best practices
Snyk provides you with a handy cheatsheet for making sure you follow some general guidelines for securing your serverless functions.

Serverless Reads πŸ€“

5 Ways to Understand Distributed System Logging and Monitoring
Ran Ribenzaft from Epsagon outlines several ways to add observability into your serverless applications.

Serverless = Distraction-Free
Alex Glikson gives us another “what is serverless” post, but positions it as an approach that reduces distractions when building applications. I kind of like that line of thinking.

Serverless Caching for Faster Data Serving
This is such a strange post that I had to include it. No disrespect to the author, but I’ve never heard the term “serverless caching” before, and I’m not sure I want to hear it again. This is why we need to Stop Calling Everything Serverless!

When you’re all caught up on the new season of The Handmaid’s Tale… 🍿

Writing unit tests in serverless applications
Marcia Villalba is back with another video in her serverless testing series. This time she shows us how to write unit tests with Jest.

How to build a social network entirely on serverless
In this talk, Yan Cui discusses his journey of migrating a social network startup to serverless, and how his team was able to improve performance, scalability and feature delivery using serverless technologies.

Visual Notes – Amazon API Gateway & Amazon Personalize
Can you draw me a picture? Jerry Hargrove (aka @awsgeek) has some more excellent visual notes for those of you that would rather read comic books instead of documentation. πŸ‘¨πŸ»β€πŸŽ¨

Serverless ❀️ GraphQL | 2019 – Serverless Architecture Conference
Here are Marcia Villalba’s slides from her talk at the Serverless Architecture Conference in The Hague.

When you want to know what AWS has been cranking on… βš™οΈ

Updates to Serverless Architectural Patterns and Best Practices
Drew Dennis recaps some of the updates since re:Invent 2018 that have enhanced the AWS serverless ecosystem.

Amazon Personalize Now Generally Available
Um, so yeah, now pretty much any site can have the personalization features of Amazon.com. Lots of powerful stuff outlined in this blog post.

Amazon Pinpoint now includes support for AWS CloudFormation
Now you can configure Pinpoint as part of your infrastructure, which will be a great way to build reusability into your targeting campaigns.

Serverless Image Handler Now Leverages Sharp and Provides Smart Cropping with Amazon Rekognition
I love that this now has a facial recognition cropping feature. It’s not particularly innovative (we were doing this back in 2010), but having it just done for you (without licensing facial recognition software) is nice.

Amazon CloudWatch Launches Dynamic Labels on Dashboards
Maybe not “serverless” news, but I like this little personalization feature for your dashboards. Now I can stop telling people, “no, I can’t change the label.”

Amazon ECS Support for Windows Server 2019 Containers is Generally Available
There are no words. I mean, can’t we just run .NET Core on Linux?

Upcoming Serverless Events πŸ—“

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

June 12, 2019 – VS Code + AWS Serverless Workflow by Stackery

June 12, 2019 – Azure Service Bus, better managed and monitored using Serverless360 (webinar)

June 12, 2019 – AWS Lambda & Serverless: Making It the Best Thing that Happened to AppSec (webinar)

June 17, 2019 – Premiere episode of the Serverless Chats Podcast. πŸ™‚

June 21, 2019 – ServerlessDays Milan.

June 25-26, 2019 – AWS re:Inforce. I’ll be doing a Dev Chat on Serverless Security.

July 8, 2019 – Thundra – Happier Customers with Serverless and Observability (webinar)

July 11, 2019 – ServerlessDays London

July 11, 2019 – AWS Summit New York

August 27, 2019 – ServerlessDays Sydney

August 29, 2019 – ServerlessDays Melbourne

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 Rick Houlihan (@houlihan_rick). Rick is a Principal Technologist for NoSQL at AWS and a #NoSQL wizard πŸ§™β€β™‚οΈ. If you’re building serverless applications, and you’re using (or thinking about using) DynamoDB, Rick is definitely your guy. For some context, be sure to watch his Amazon DynamoDB Deep Dive: Advanced Design Patterns for DynamoDB (DAT401) session from re:Invent 2018 and Advanced Design Patterns for Amazon DynamoDB (DAT403-R) from re:Invent 2017. Rick will completely change how you think about NoSQL and DynamoDB. These videos inspired me, and I think others will be inspired too. Thanks for sharing your knowledge, Rick! It is incredibly helpful. πŸ™Œ

Final Thoughts πŸ€”

Another week in the books, with plenty of happenings in the serverless ecosystem. Be sure to check out the inaugural episode of the Serverless Chats Podcast with guest Alex DeBrie on Monday, June 17th. We had a great chat about Serverless Purity vs. Practicality that I think you’ll enjoy.

Also, on a personal note, I just passed 5,000 followers on Twitter πŸŽ‰, which is pretty cool. Interacting with all of you, and sharing thoughts and ideas on serverless, is one of my very favorite things to do. You all make that possible, and I’m very thankful for all of you and the serverless community. πŸ™‡β€β™‚οΈ

I hope you enjoyed this issue of Off-by-none. Please send me your feedback and suggestions as they help to make this newsletter better each week. You can reach me via Twitter, LinkedIn, Facebook, or email and let me know your thoughts, criticisms, or (perhaps) even how you’d like to contribute to Off-by-none.

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

Take care,
Jeremy

Previous Issue

Issue #40June 4, 2019

Next Issue

Issue #42June 18, 2019

Sign up for the Newsletter

Stay up to date on using serverless to build modern applications in the cloud. Get insights from experts, product releases, industry happenings, tutorials and much more, every week!

 

Check out all of our amazing sponsors and find out how you can help spread the #serverless word by sponsoring an issue.

 

About the Author

Jeremy is the CEO and Founder of Ampt and an AWS Serverless Hero that has a soft spot for helping people solve problems using serverless. He frequently consults with companies and developers transitioning away from the traditional β€œserver-full” approach. You can find him ranting about serverless on Twitter, in several forums and Slack groups, hosting the Serverless Chats podcast, and at conferences around the world.

 

Nominate a Serverless Star

Off-by-none is committed to celebrating the diversity of the serverless community and recognizing the people who make it awesome. If you know of someone doing amazing things with serverless, please nominate them to be a Serverless Star ⭐️!