Chapter 4. Programming your infrastructure: the command line, SDKs, and CloudFormation
This chapter covers
- Understanding the idea of infrastructure as code
- Using the CLI to start a virtual server
- Using the JavaScript SDK for Node.js to start a virtual server
- Using CloudFormation to start a virtual server
Imagine that you want to create room lighting as a service. To switch off the light in a room with software, you need a hardware device like a relay that can break the circuit. This hardware device must have some kind of interface that lets you send it commands like on and off via software. With a relay and an interface, you can offer room lighting as a service. This also applies to virtual server as a service. If you want to start a virtual server via software, you need hardware that can handle and fulfill your request. AWS provides infrastructure that can be controlled via an interface called an application programming interface (API). You can control every part of AWS over the API. Calling the API is possible with SDKs for most programming languages, the command line, and more sophisticated tools.