Chapter 10. Cloud Deployments


The advent of cloud providers has changed the landscape of web application hosting. A process such as provisioning a new machine used to take hours to months; now, you can create one with as little as a click or API call. These cloud providers lease their virtual machines, called Infrastructure as a Service (IaaS), or managed software solutions such as databases, through a pay-per-usage model, which means you pay only for what you use. This enables engineers to build up entire environments for testing at a moment’s notice and tear them down when they’re no longer needed. These cloud providers also enable applications to scale horizontally based on performance need at a moment’s notice. This chapter covers basic NGINX and NGINX Plus deployments on a couple of the major cloud provider platforms.

Auto-Provisioning on AWS


You need to automate the configuration of NGINX servers on Amazon Web Services for machines to be able to automatically provision themselves.


Utilize EC2 UserData as well as a prebaked Amazon Machine Image. Create an Amazon Machine Image (AMI) with NGINX and any supporting software packages installed. Utilize Amazon EC2 UserData to configure any environment-specific configurations at runtime.


There are three patterns of thought when provisioning on Amazon Web Services:

Provision at boot
Start from a common Linux image, then run configuration management or shell scripts at boot time to ...

Get NGINX Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.