- We will duplicate the nodeserver-cf-template.py updated previously in Chapter 5, Scaling Your Infrastructure, and make a version optimized for our new architecture:
$ cp nodeserver-cf-template.py nodeserver-vpc-cf-template.py
- We will now open the nodeserver-vpc-cf-template.py script in our editor to start making changes. The EC2 instances won't have a public IP, therefore we can change our security group to not allow SSH traffic from our public IP. This means that we can remove the code that gets our public IP:
from ipaddress import ip_networkfrom ipify import get_ip PublicCidrIp = str(ip_network(get_ip()))
- Now that our infrastructure will be run using a private IP, we ...