How do I use the AWS CLI to register a Lambda function as a target behind my Application Load Balancer?
2 minute read
0
I want to register an AWS Lambda function as a target behind my Application Load Balancer. To complete this action, I want to use the AWS Command Line Interface (AWS CLI).
To create a target group with the target type set to Lambda, run the create-target-group command. Replace [your target group's name] with the name of your target:
To allow Elastic Load Balancing (ELB) to invoke your Lambda function, run the add-permission command. Replace [your Lambda function's name] and [your target group's ARN] with your respective names:
To register Lambda as the target, run the register-targets command. Replace [your target group's ARN] and [your Lambda function's ARN] with your information: