This template creates and configures a launch template to assign public IP addresses to instances launched in a nondefault VPC. Note that when you specify a network interface for Amazon EC2 Auto Scaling, specify the VPC subnets as properties of the Auto Scaling group, and not in the launch template (because they will be ignored). This example launch template also sets the instance placement tenancy to `dedicated`.

CloudFormation Template