putting DynamoDB scalability knobs on autopilot

one small change to your serverless.yml file that can get you on your way

Doug Tangren
Nov 29, 2018 · 2 min read

AWS Reinvent never fails to deliver as was the case this year. This year the AWS DynamoDB team announced support for an automatic provisioning pricing plan. What does that mean for you? It means you now have a path for removing need to apply guesswork in the tuning of scalability knobs on your DynamoDB tables. This is a pay-for-what-you-use model. Sound familiar? It should if you are doing anything in the serverless space.

It’s sometimes unclear how to immediately take advantage of these offerings so I wanted write up a quick example of how to start taking advantage of this in your serverless framework applications today.

Below is what you’re probably used to with serverless framework, guessing ProvisionedThroughput values, hopefully tweaking through experimentation.

Today you can now replace ProvisionedThoughput with BillingMode PAY_PER_REQUEST to immediately start taking advantage of this offering. Since serverless framework uses cloud formation under the you can also just do this with your plain cloud formation templates.

Just run npx serverless deploy and rejoice. When your deployment completes you should see a capacity configuration like the following in the AWS DynamoDB console.

Note the billing option is called pay per request. This means you must now pay of course. You are charged $1.25 per million write requests units and $0.25 per million read request units, plus the usual data storage costs. For most cases thats incredible value considering what you pay for a star bucks coffee in the morning!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store