A small example of using AWS CloudFormation to set up an EC2 instance in a private network (VPC).
- You need to have an AWS account set up.
- The AWS SDK for Python Boto3 needs to be installed. This can be done from the repo or via a software like pip.
- The above SDK needs to be configured to your AWS account credentials (instructions in the repo README).
- tmpl.json describes the configuration of the EC2 instance. It must be stored in an AWS S3 bucket as an object - you need the URL of this object.
- A public-private key pair needs to be created. Information here. You need the name of this key pair.
- Using the URL from 1 and the key pair name from 2, you can use the function from setup.py. See the example function call in that file.
- Feel free to modify tmpl.json to modify or add more features to your CloudFormation stack.