Why is the Lambda function not being invoked?
A Lambda function cannot be registered as a target for an ALB.
A Lambda function can be registered with an ALB using AWS Management Console only.
The permissions to invoke the Lambda function are missing.
Cross-zone is not enabled on the ALB.
Explanations:
A Lambda function can indeed be registered as a target for an Application Load Balancer (ALB) in AWS. This is a supported feature, allowing HTTP requests to trigger Lambda functions.
Lambda functions can be registered with an ALB using both the AWS Management Console and the AWS CLI. There is no restriction that requires the console for this action.
For the ALB to invoke a Lambda function, the appropriate permissions must be granted. The Lambda function’s resource policy must allow the ALB to invoke it, otherwise requests sent through the ALB will not trigger the Lambda function.
Cross-zone load balancing being enabled or disabled does not affect the ability of an ALB to invoke a Lambda function. This setting relates to the distribution of traffic across instances in an Auto Scaling group, not Lambda invocation.