Question: I need a static IP address for my Application Load Balancer. How can I register an Application Load Balancer behind a Network Load Balancer?

I need a static IP address for my Application Load Balancer.

Short descriptionYou can't assign a static IP address to an Application Load Balancer. If your Application Load Balancer requires a static IP address, then it's a best practice to register it behind a Network Load Balancer. The static IP address that's assigned to a Network Load Balancer doesn't change and provides a fixed entry point for your Application Load Balancer.Note: The following resolution applies to the New Amazon Elastic Compute Cloud (Amazon EC2) Experience console. To complete the steps, toggle on this feature in the Amazon EC2 console.

ResolutionCreate new target groups for TCP 80 and TCP 443 traffic, and register your Application Load Balancer as a targetTo create new target groups and register targets for Amazon EC2 instances, follow these steps:1.    Open the Amazon EC2 console.2.    In the navigation pane, expand Load Balancing, and then choose Target Groups.3.    Choose Create target group.4.    For Choose a target type, choose Application Load Balancer.5.    For Target group name, enter a name for the target group.6.    From the Protocol and Port dropdown lists, choose protocol TCP and port 80 for HTTP traffic.7.    From the VPC dropdown list, choose the virtual private cloud (VPC) for your Application Load Balancer.8.    From the Health Check protocol dropdown list, choose either HTTP or HTTPS for your Application Load Balancer that returns an HTTP 200–399 status.9.    Choose Next.10.    From the Application Load Balancer dropdown list, choose your Application Load Balancer.11.    Choose Create target group.12.    Repeat steps 3–11 to create an additional target group. When repeating step 6, choose TCP protocol and Port 443 to create another target group for HTTPS traffic.Create and configure a Network Load Balancer to forward HTTP and HTTPS traffic to your Application Load BalancerTo create and configure a Network Load Balancer to forward HTTP and HTTPS traffic to your Application Load Balancer, follow these steps:1.    Open the Amazon EC2 console.2.     In the navigation pane, expand Load Balancing, and then choose Load Balancers.3.    Choose Create a Load Balancer.4.    For Load balancer types, choose Network Load Balancer, and then choose Create.5.    For Load balancer name, enter a name for the Network Load Balancer.6.    In Scheme, choose either Internet-facing or Internal. You can use an internal Application Load Balancer with an internet-facing Network Load Balancer.7.    For IP address type, choose IPv4.8.    From the VPC dropdown list, choose your VPC.9.    For Mappings, choose one or more Availability Zones and subnets. Choose private subnets for Internal load balancers or public subnets for internet-facing load balancers.10.    From the IPv4 address dropdown list, choose either Assigned by AWS or Use an Elastic IP address.11.    From the Protocol and Port dropdown lists, choose protocol TCP and port 80 for HTTP traffic.12.    From the Default action dropdown list, choose the target group that contains your Application Load Balancer as registered targets.13.    Choose Add listener, and then repeat steps 11–12. Choose protocol TCP and port 443 with a default action that forwards traffic to the TCP 443 target group for your Application Load Balancer.14.    Choose Create load balancer.15.    Follow the instructions to test the load balancer.Note: To use HTTP to HTTPS redirects on your Application Load Balancer with this configuration, you must create two target groups. Create one Application Load Balancer target group for TCP 80 and another one for TCP 443.Configure your Application Load Balancer’s security groups and network access control lists (network ACLs) to allow health checks from the Network Load Balancer's private IP address.

Related informationUsing AWS Lambda to activate static IP addresses for Application Load BalancersApplication Load Balancer now activates AWS PrivateLink and static IP addresses by direct integration with Network Load Balancer