All of the Docker Swarms we have created so far are wonderful to use in development or to experiment or to use for demonstration purposes. If we want to create a Swarm that can be used as a production environment where we run our mission-critical applications, though, then we need to create a—I'm tempted to say—real Swarm in the cloud or on premises. In this book, we are going to demonstrate how to create a Docker Swarm in AWS.
One way to create a Swarm is by using docker-machine (DM). DM has a driver for AWS. If we have an account on AWS, we need the AWS access key ID and the AWS secret access key. We can add those two values to a file called ~/.aws/configuration. It should look like the following: