Deep Dive on Advanced features on AWS Application Load Balancer and Network Load Balancer

Deep Dive on Advanced features on AWS Application Load Balancer and Network Load Balancer

AWS ELB Family

Overview of recently launched features on ALB and NLB

Agenda

ALB Features

Advanced Request Routing

Typical Request

Conditions and Actions

ALB Actions

CloudWatch Metrics

Query Parameters based Routing

Query Parameters

Query parameters based routing

HTTP method based Routing

HTTP MethodHTTP Routing

  1. When you click the “GET” button, a HTTP GET request is sent to the “exampleloadbalancer” demo Application Load Balancer.

HTTP MethodHTTP Routing

Source IP CIDR Based Routing

Source IP CIDRSOURCE IP Routing

  1. Let’s imagine that there is a page that is only accessible from your admin network whose IP CIDR is 203.0.113.0/24.

HTTP Header based routing (User-Agent Header)

HTTP HeaderHTTP Header routing

ALB Redirect Feature

Redirect Feature

Without Redirect

Fixed Response

[
{
"Type": "fixed-response",
"FixedResponseConfig": {
"StatusCode": "200",
"ContentType": "text/plain",
"MessageBody": "Hello world"
}
}
]

How to securely publish Internet applications at scale using Application Load Balancer and AWS PrivateLink

AWS Private Link and ELB

How to use AWS PrivateLink to secure and scale web filtering using explicit proxy

Proxy with ELB and Privatelink

Lambda Functions as targets

Taregets as Lambda, Ec2, Onprem

ALB as Trigger

Health Checks

{
“requestContext”:{
“elb”:{
“targetGroupArn”:”arn:aws:elasticloadbalancing:region:123456789012:targetgroup/my-target-group/6d0ecf831eec9f09"
}
},
“httpMethod”:”GET”,
“path”:”/”,
“queryStringParameters”:{ parameters },
“headers”:{
“accept”:”text/html,application/xhtml+xml”,
“accept-language”:”en-US,en;q=0.8",
“content-type”:”text/plain”,
“cookie”:”cookies”,
“host”:”lambda-846800462-us-east-2.elb.amazonaws.com”,
“user-agent”:”Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)”,
“x-amzn-trace-id”:”Root=1–5bdb40ca-556d8b0c50dc66f0511bf520",
“x-forwarded-for”:”72.21.198.66",
“x-forwarded-port”:”443",
“x-forwarded-proto”:”https”
},
“isBase64Encoded”:false,
“body”:”request_body”
}

{
"isBase64Encoded": false,
"statusCode": 200,
"statusDescription": "OK",
"headers": {
"Set-cookie": "cookies",
"Content-Type": "text/html; charset=utf-8"
},
"body": "Hello from Lambda (optional)"
}

Authentication on ALB

Authentication on ALB

OIDC Configuration

Cognito Configuration

{
"alg": "algorithm",
"kid": "12345678-1234-1234-1234-123456789012",
"signer": "arn:aws:elasticloadbalancing:region-code:account-id:loadbalancer/app/load-balancer-name/load-balancer-id",
"iss": "url",
"client": "client-id",
"exp": "expiration“
}