We will first install the troposphere library:
$ pip install troposphere
Once the installation is done, you can then create a new file called helloworld-cf-template.py.
We will start our file by importing a number of definitions from the troposphere module:
"""Generating CloudFormation template.""" from troposphere import ( Base64, ec2, GetAtt, Join, Output, Parameter, Ref, Template, )
We are also going to define a first variable that will make editing the code easier for the remainder of the book as we will create new scripts building on this initial template:
ApplicationPort = "3000"
From a code standpoint, the first thing we will do is initialize a Template variable. By the ...