🆕 Video Course Out Now: Rapid Docker on AWS

Eat your own dog food: how AWS leverages Serverless

Michael Wittig – 10 Dec 2018

Tim Bray from Amazon gave a great talk at re:Invent 2018 where he shows us how AWS uses Serverless technologies. Did you know that some of the newer services such as API Gateway and EKS are using API Gateway and Lambda to implement the control plane? In this post, I summarise a few interesting points he made. I also encourage you to watch the full video.

Dog Food

SQS internals

SQS provides message queues as a service. The following figure shows a high-level architecture of the SQS service.

SQS internals

When a client make calls to the SQS API, you talk to the Front End service of SQS. The Front End service asks the Metadata service (backed by DynamoDB) for internal data about the queue. Does it exist? How does the queue policy look like? Which Back End cluster is responsible for the queue? Once the Front End knows the answers, it likely checks if the requestor is allowed to make the request and routes the request to one of the many Back End clusters to process the message. A single Back End cluster is responsible for one or many queues (or partitions of a queue) and stores your messages in a distributed manner on the cluster.

In the background, the Load Manager service continually checks the utilization of the Back End clusters. If a cluster gets hot, the queues are partitioned and/or moved to other/new clusters. If clusters idle, queues are moved as well to shut down whole clusters. As users of SQS, we don’t see any of this. We send and retrieve messages.

One funny anecdote Tim shares with us: the SQS team replaced an Oracle Database with DynamoDB.

Cover of Amazon Web Services in Action

Level up, strengthen your AWS skills.

Our book Amazon Web Services in Action is a comprehensive introduction to computing, storing, and networking in the AWS cloud. You'll find clear, relevant coverage of all the essential AWS services, emphasizing best practices for security, high availability, and scalability. Get the first chapter for free!

Amazon MQ internals

Amazon MQ runs ActiveMQ brokers on your behalf. The following figure shows a high-level architecture of the ActiveMQ service.

Amazon MQ internals

The brokers itself run on EC2 Instances and likely persist your state on EBS volumes. Tim calls this the Data Plane. Interestingly, the Control Plane (e.g., the public API) is implemented using API Gateway and Lambda functions that store the state about the ActiveMQ clusters in DynamoDB.

AWS uses Serverless to implement control planes

Also, Tim talks about a few other services that come with Serverless control planes:

  • Amazon SageMaker
  • AWS Batch
  • AWS Elemental
  • AWS AppSync
  • AWS IoT Core
  • Amazon GuardDuty
  • Amazon EKS
  • Amazon API Gateway

Funny story: API Gateway itself uses a Serverless control plane.

Full video

I hope you are now interested in the full talk!



What’s your favorite talk from re:Invent? Let me know!

Michael Wittig

Michael Wittig

I’m an independent consultant, technical writer, and programming founder. All these activities have to do with AWS. I’m writing this blog and all other projects together with my brother Andreas.

In 2009, we joined the same company as software developers. Three years later, we were looking for a way to deploy our software—an online banking platform—in an agile way. We got excited about the possibilities in the cloud and the DevOps movement. It’s no wonder we ended up migrating the whole infrastructure of Tullius Walden Bank to AWS. This was a first in the finance industry, at least in Germany! Since 2015, we have accelerated the cloud journeys of startups, mid-sized companies, and enterprises. We have penned books like Amazon Web Services in Action and Rapid Docker on AWS, we regularly update our blog, and we are contributing to the Open Source community. Besides running a 2-headed consultancy, we are entrepreneurs building Software-as-a-Service products.

We are available for projects.

You can contact me via Email, Twitter, and LinkedIn.

Briefcase icon
Hire me