In this recipe, we will outline how to deploy AWS VPCs using Ansible. AWS VPCs are the foundational networking construct in AWS and they can be thought of as a virtual data center within the cloud that the administrator creates within their AWS account. In order to start building any other infrastructure-related services within AWS, a VPC must first be created. We will outline how to describe all the required VPCs and how to automate their creation using Ansible.
To connect to the AWS API, the AWS control machine must be connected to the internet. The AWS account must also be prepared, as outlined in the previous recipe, with the required AWS credentials.