This guide will lead you step by step through the process of packaging, deploying, monitoring and operating a state of the art web application within a cloud environment. Each step comes with a complete runnable sample so you can see the code evolve through the different stages. Depending on your interest or prior knowledge you should be able to either follow this guide step by step or directly dive into a topic of your interest.


In order to reproduce the examples in this guide you will need the following tools available on your machine.

  • Git for checking out the example source code
  • Terraform to provision the needed infrastructure
  • A Java SDK is needed to compile the application

All tools should be available by your package manager in case of Linux or by brew if you work on a Mac. In case something is missing have a look at the following links for installation instructions:

Additionally you will need to create an account for Amazon Web Services which can be done here.

AWS offers a free trial for most of the services for the first 12 months (of course with usage/instance size limits). This guide tries to use as much of this free tier as possible, but please be aware that costs may occur.


Source code

If source code is available for a specific topic a link inside the breadcrumb panel on the top of the page will directly link to it.

Breadcrumb Source Link


The source code for each step is available at On the top of each source code snippet a link points directly to the source file containing the snippet.

class TodoApplication {
  // [...]

Shell commands

Lines beginning with a $ sign are commands that can be executed, where the base directory for each command is always the source directory for the current topic.

$ this is a shell command

This is the commands output


    The Basics

    This chapter will guide you through the basic project setup as well as the first deployment.


    We have to make sure our application can cope with any kind of demand, ranging from nearly now traffic on christmas eve to thousands of request per second after a tv advertisment.

    Continous Delivery/Deployment

    To be able to quickly respond to any kind of change, we will have to implement continous delivery and deployment to keep up the constant stream of new requirements.

    Monitoring and Logging

    To discover performance issues and outages before they happen and to debug problems we need in depth monitoring and logging.


    As our application grows and gets more complex we need to integrate operational concerns into our sourcecode to ensure stability.