AWS - Elastic Load BalancingYou want to use a target group with Lambda functions and EC2 instances. How should you configure this?ARegister Lambda functions and EC2 instances in the same target group.BUse only Lambda functions in target groups; EC2 instances cannot be targets.CCreate separate target groups for Lambda and EC2, then attach both to the load balancer.DAttach Lambda functions directly to the load balancer without target groups.Check Answer
Step-by-Step SolutionSolution:Step 1: Understand target group target typesTarget groups accept one target type: instance, IP, or Lambda. Mixing Lambda and EC2 in one group is not supported.Step 2: Correct configuration approachCreate separate target groups for Lambda and EC2, then attach both to the load balancer to route traffic accordingly.Final Answer:Create separate target groups for Lambda and EC2, then attach both to the load balancer. -> Option CQuick Check:Separate target groups needed for different target types [OK]Quick Trick: Use separate target groups for Lambda and EC2 [OK]Common Mistakes:Trying to mix Lambda and EC2 in one target groupAssuming EC2 cannot be targetsThinking Lambda attaches directly without target groups
Master "Elastic Load Balancing" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes AWS Lambda - Creating a Lambda function - Quiz 1easy Auto Scaling - Scaling policies (target tracking, step, simple) - Quiz 8hard Auto Scaling - Launch templates - Quiz 7medium CloudWatch - Default vs custom metrics - Quiz 7medium CloudWatch - Default vs custom metrics - Quiz 1easy DynamoDB - Tables, items, and attributes - Quiz 12easy DynamoDB - Secondary indexes (GSI, LSI) - Quiz 3easy DynamoDB - Time to live (TTL) for expiration - Quiz 13medium Elastic Load Balancing - Network Load Balancer (NLB) - Quiz 11easy SNS and SQS - SQS queue concept - Quiz 8hard