Configuration to create a Network Load Balancer (NLB), target groups and listeners in an AWS VPC to load balance incoming traffic to targets such as EC2 instances or ALBs. The NLB also includes health checks to ensure the state of the targets before forwarding traffic.

This template includes settings for configuring: 

  • Load balancer Name and Schema (Internet vs Internal)
  • Subnet Mapping to set network settings
  • Deletion Protection to prevent the load balancer from being deleted accidentally 
  • Enabling S3 Access Logging to log requests processed by the load balancer
  • Target Groups to configure the destination for the load balancer:
    • Target Type can be an EC2 instance, IP address or ALB and Target Id
    • ProtocolProtocol Version, and Port
    • If HTTPS is selected, then SSL policy and Certifiacte ARN must be provided
    • Health Check settings such as path, interval, etc.
  • Listeners to specify the ports the load balancer accepts connections on:
    • Protocol and Port number
    • Actions such as Forward, Fixed-Response or Redirect
  • Load Balancer Attributes such as Cross Zone Load Balancing
Items
1
Size
0.5 KB
Missing Parameters
AWSTemplateFormatVersion: '2010-09-09'
Description: ''
Resources:
  NetworkLoadBalancer:
    Type: 'AWS::ElasticLoadBalancingV2::LoadBalancer'
    Properties:
      Type: network
      Scheme: internet-facing
      IpAddressType: ipv4
      SubnetMappings:
        - SubnetId: ''
      LoadBalancerAttributes:
        - Key: deletion_protection.enabled
          Value: false
        - Key: access_logs.s3.enabled
          Value: false
        - Key: load_balancing.cross_zone.enabled
          Value: false
Parameters: {}
Metadata: {}
Conditions: {}

Actions



Customize Template

Load Balancer


Target Groups*

Listeners*

* Required field