Unable to specify target_group_arn for ALB

I am writing a terraform script in which i have separate modules. I want to create two different target groups for my ALB (one for the front-end, one for the back-end), but im having troubles in doing that. Here is my code: alb/main.tf resource "aws_lb" "main" { name = "${var.name}-alb-${var.environment}" internal = false load_balancer_type =… Read More Unable to specify target_group_arn for ALB

Path Based Listener Rule on Application Load Balancer doesn't forward to the Target Group

I have below path based listener setting. Each Target Group set up on IP address target type on different ports. Client on port 3000 Safety on port 5070 Action on port 5010 On default action, it successfully forward to the Target Group. But when I set it up as a path based, it fails to… Read More Path Based Listener Rule on Application Load Balancer doesn't forward to the Target Group

Describe listener rule count using lambda boto3

I just used below code on Lambda function and length function to calculate listner rules. However it always return the value as 2 even ALB has more than 20 rules. import json import boto3 def lambda_handler(event, context): client = boto3.client(‘elbv2’) response1 = client.describe_listeners( ListenerArns=[ ‘arn:aws:elasticloadbalancing:eu-west-2:account_id:listener/app/my_load_balancer_listener’, ], ) tot = len(response1) return response1 Get the output… Read More Describe listener rule count using lambda boto3