Surviving the Zombie Apocalypse by Building Serverless Microservices

AWS Startups
AWS Startup Collection
6 min readAug 26, 2016

By Rei Biermann, AWS Startups

Participants at DevOps Week, AWS Pop-up Lofts, San Francisco

AWS DevOps Week at the AWS Pop-up Lofts

During the second week of August, developers and enthusiasts came together at the AWS San Francisco Loft to learn how Amazon Web Services approaches DevOps to keep teams small and working fast. These introductory sessions are a great way to begin building your AWS knowledge. They provide the foundation you need to be successful. With the entire week dedicated to DevOps, there was so much to cover that we couldn’t include it all here! Although we’re only reviewing the Zombie workshop in this blog, you can check out the other presentations, such as Configuration Management, Improving Infrastructure, or Releasing Software Quickly and Reliably. To view all of the speakers’ decks just go to the AWS SlideShare account.

Zombie Apocalypse Workshop: A Recap

The Zombie Apocalypse workshop is a half-day session that shows you how to build serverless microservices. Led by AWS Solution Architects Warren Santer and Kyle Somers, the goal was to teach the group how to use AWS Lambda, Amazon API Gateway, Amazon DynamoDB, and Amazon Cognito to add features to a hypothetical communications system built by the “AWS Lambda Signal Corps.” The premise was that zombies had taken over major metropolitan areas, and we were tasked to work with a team to build a secure, scalable, fault-tolerant service with global reach. Using a lab guide provided to us on GitHub, each team worked to add real-time life-saving features (e.g., food cache locations, zombie motion detectors, undead counters, etc.) to the chat platform using Lambda functions.

Solution Architect Mackenzie Kosut having fun at the AWS Pop-up Loft in New York

During a zombie apocalypse it’s safe to assume that you don’t have a lot of time. You need to get your code up and running as soon as possible. AWS Lambda automatically runs your code without requiring you to provision or manage servers. You just write the code and upload it to AWS Lambda. AWS Lambda provides continuous scaling by running code in response to each trigger. This is very useful as your community grows and more messages are sent between survivors because you don’t have to manage the scaling of the chat application. Your code runs in parallel and processes each trigger individually, scaling precisely with the size of the workload. Because resources are a precious commodity during a zombie apocalypse, AWS Lambda helps because it doesn’t charge you when your code is not running.

For survivors managing multiple versions and stages of an API, Amazon API Gateway provides a managed cache to store API responses. It also reduces latency and generates SDKs for iOS, Android, and Javascript. It easily imports Swagger API definitions, and defines a set of variables for working with models and mapping templates.

Next, the group tackled the problem of on-boarding and managing the scattered survivors of our communication system. Amazon Cognito made this simple by allowing us to easily create and maintain a user directory that could scale to 100s of millions of users. We could add sign-up and sign-in functionality to our mobile or web app without worrying about server infrastructure. Plus, it provided enhanced security features, such as verification of phone numbers and email addresses. That meant we didn’t have to worry about managing servers, we could run at scale, respond quickly to events and increase our productivity. All these services saved us time which was important since we did have a zombie apocalypse to thwart!

The first thing we noticed once we started building was that the original engineers didn’t get very far! To continue where they left off we had to implement chat add-ons with the steps provided from the Lab Guide. For an extra challenge, we could implement channel functionality for different chat rooms, store data for weapons and food caches, and build a bot to notify the survivors of cache levels. After groups were created and leaders selected, we chose the challenge we wanted to complete. These challenges could be anything from adding zombie motion sensors, to showing a typing indicator, to integrating SMS text functionality with Twilio or integrating Slack.

Although our team wasn’t able to complete our challenge in time, you can pick up where we left off and test your own skills by repeating the workshop with a team or by yourself. Just visit AWS Labs on GitHub to get started. Special thanks to our DevOps week sponsors, Intel and Threat Stack!

The leader in cloud security management and compliance solutions.

Threat Stack

AWS is making it easier than ever to provision systems and infrastructure to grow your business, quickly. Building, deploying, and delivering services fast has become a significant competitive advantage to organizations, driven by DevOps workflows, processes, and culture.

Time is a barrier to this type of value delivery so teams must go as fast as possible. But, moving fast also requires moving securely; by implementing security early on you can achieve rapid time to market and have confidence that you (and your customers) are protected from insider threats, external attacks, data loss and more.

The good news is that you don’t need to make major changes to your development methods or cycles in order to integrate security. The first step is to get all teams — Security, Development, and Operations — thinking about and participating in security-focused process. But, this doesn’t have to be difficult if security can be integrated into the tools and processes that your DevOps teams are already using, from Kanban boards and scrums, to tools for chat ops and configuration management. Not only does Threat Stack integrate with your favorite Dev and Ops tools, it has been purpose-built in the cloud to enable AWS customers running in the cloud. Threat Stack’s AWS CloudTrail integration immediately alerts you on changes to your instances, security groups, Amazon S3 buckets and access keys, and automatically correlates this to adverse effects to your systems. The Threat Stack Cloud Security Platform automatically scales up or down with the capacity of your AWS infrastructure, ensuring continuous visibility across your dynamic environment. Threat Stack also integrates Amazon EC2 data right into the application, giving users the ability to easily correlate host data with the Amazon EC2 information. You don’t have to choose between moving fast and moving securely; with the right technology partners you can easily do both.

AWS utilizes Intel® Xeon® processors for EC2 Instances providing customers with high performance and value.

Intel

Get the Intel® Advantage | Intel’s latest 22nm Haswell microarchitecture on new C4 instances, with custom Intel® Xeon® v3 processors, provides new features:

· Haswell microarchitecture has better branch prediction; greater efficiency at prefetching instructions and data; along with other improvements that can boost existing applications’ performance by 30% or more.

· P state and C state control provides the ability to individually tune each cores performance and sleep states to improve application performance.

· Intel® AVX2.0 instructions can double the floating-point performance for compute-intensive workloads over Intel® AVX, and provide additional instructions useful for compression and encryption.

Intel® Processor Technologies

· Intel® AVX — Get dramatically better performance for highly parallel HPC workloads such as life science engineering, data mining, financial analysis, or other technical computing applications. AVX also enhances image, video, and audio processing.

· Intel® AES-NI — Enhance your security with these new encryption instructions that reduce the performance penalty associated with encrypting/decrypting data.

· Intel® Turbo Boost Technology — Get more computing power when you need it with performance that adapts to spikes in your workload with Intel® Turbo Boost Technology 2.0.

--

--

AWS Startups
AWS Startup Collection

Amazon Web Services Startup Program. Follow @AWSstartups.