How to do it...

Follow these steps to create a load balancer using CloudFormation:

  1. Open up your text editor and create a new CloudFormation template. We're going to require a VPC ID and some subnet IDs as Parameters. Add them to your template, as follows:
      AWSTemplateFormatVersion: '2010-09-09'       Parameters:         VPCID:           Type: AWS::EC2::VPC::Id           Description: VPC where load balancer and instance will launch         SubnetIDs:           Type: List<AWS::EC2::Subnet::Id>           Description: Subnets where load balancer and instance will launch (pick at least 2)
  1. Next, we need to add some Mappings of ELB account IDs. We'd like to be able to store logs for our ELB and store them in an S3 bucket. This requires updating the bucket policy on our S3 bucket to allow access to ...

Get AWS SysOps Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.