DynamoDB

How to create Private DynamoDB tables accessible only within a VPC

DynamoDB is a fully managed NoSQL database service known for its low latency and high scalability. Like most other AWS services, it’s protected by AWS IAM. So, despite being a publically accessible service, your data is secure. Conversely, zero-trust networking tells us we should always authenticate the caller and shouldn’t trust someone just because they’re …

How to create Private DynamoDB tables accessible only within a VPC Read More »

How to Securely let Frontend Apps to Directly Access AWS services

Lean manufacturing focuses on minimizing waste while simultaneously maximizing productivity. If you apply the same mindset and look at our applications today, you will find many CRUD APIs that add little value beyond authentication and authorization. That is, they provide authorised access to a database and ensure a user can’t access someone else’s data. However, …

How to Securely let Frontend Apps to Directly Access AWS services Read More »

How to perform database migration for a live service with no downtime

Migrating the database while continuing to serve user requests can be challenging. It’s a question that many students have asked during the Production-Ready Serverless workshop. So here’s my tried-and-tested approach to migrating a live service to a new database without downtime. I’m going to use DynamoDB as an example but it should work with most …

How to perform database migration for a live service with no downtime Read More »

How I built an affiliate tracking system in a weekend with serverless

Having taught thousands of students to build serverless applications via my online courses and workshops, I felt it was time to kick-start an affiliate program to boost sales. Affiliates would receive 50% of the revenue and get a 15% discount code for their audience. It feels like a good deal but I would need a …

How I built an affiliate tracking system in a weekend with serverless Read More »

How to model one-to-many relationships with AppSync and DynamoDB

Thank you to Josh for asking this question on the AppSync Masterclass forum. His original question goes like this: Let’s say I want to add a one-to-many relationship from Profile to a new property called “Tag” (a complex object with “name” and “color” properties) so a user can define their own Tags. I would also like a …

How to model one-to-many relationships with AppSync and DynamoDB Read More »

AppSync: how to error on DynamoDB conditional check failures

TL;DR To make an AppSync DynamoDB resolver throw exceptions on conditional check errors, we need to check $context.error in the response mapping template ourselves. Like this: #if ( $ctx.error ) #if ( $ctx.error.type.equals(“DynamoDB:ConditionalCheckFailedException”) ) $util.error(“your error message”) #else $util.error($ctx.error.message, $ctx.error.type) #end #end $utils.toJson($context.result) And now, the longer version. The problem AppSync lets us perform DynamoDB …

AppSync: how to error on DynamoDB conditional check failures Read More »

All you need to know about caching for serverless applications

Last week, someone asked me at the AWS User Group in The Hague “Is caching still relevant for serverless applications?”  The assumption here is that Lambda auto-scales by traffic, so do we still need to worry about caching? And if so, where and how do we implement caching? So let’s break it down. Caching is …

All you need to know about caching for serverless applications Read More »

How to include SNS and Kinesis in your e2e tests

Update 17/09/2019: based on feedback, I added a few more alternatives that do not require you to deploy additional Lambda functions to the e2e-test stage. Scroll to the end to find out more. Being event-driven is a key characteristic of a serverless architecture. Often our Lambda functions would publish events to SNS topics or Kinesis …

How to include SNS and Kinesis in your e2e tests Read More »

A simple event-sourcing example with snapshots using Lambda and DynamoDB

Recently, I have been helping a client implement an event-sourced system. In the process, I put together a very simple demo app to illustrate how one could build such a system using Lambda and DynamoDB. The source code is available on GitHub here. Before you go ahead and read all about the demo app, I …

A simple event-sourcing example with snapshots using Lambda and DynamoDB Read More »

Using CloudWatch and Lambda to implement ad-hoc scheduling

A while back I wrote about using DynamoDB TTL to implement ad-hoc scheduling. It generated some healthy debate and a few of you have mentioned alternatives including using Step Functions. So let’s take a look at some of these alternatives, starting with the simplest – using a cron job. We will assess this approach using the …

Using CloudWatch and Lambda to implement ad-hoc scheduling Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close