By using AWS re:Post, you agree to the Terms of Use
/Infrastructure as Code/

Questions tagged with Infrastructure as Code

Sort by most recent
  • 1
  • 90 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

How to connect a Load balancer and an Interface VPC Endpoint together using CDK?

Acronym legend: * ALB - ApplicationLoadBalancer * ATG - ApplicationTargetGroup aka Target Group * VPC - Virtual Private Cloud **Our situation:** Using the AWS Console manually, it was shown that using Route 53 to an ALB (Application Load Balancer) to a private Interface VPC Endpoint to a private REST API-Gateway to a private Lambda works well. (ALB and a gateway Custom-domain-name exist due to https and the needed Certificate) The ALB needs a Target Group which targets the IP addresses of the Interface VPC Endpoint. (We tried using InstanceIdTarget with the endpoint's vpcEndpointId, but that failed with the error *Instance ID 'vpce-WITHWHATEVERHERE' is not valid* ) Using CDK, we created the following (among other things) using the aws_elasticloadbalancingv2 module: * ApplicationLoadBalancer (ALB) * ApplicationTargetGroup (ATG) aka Target Group We added a listener to the ALB. We added the Target Group to the listener. **It’s not clear how to get the IP addresses from the VPC endpoint. We want to add the IP addresses to the ATG aka Target Group using the targets property.** How to get the IP addresses of the Interface VPC Endpoint via CDK? A sample of resources we've used: * https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html * https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2-readme.html * https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer.html * https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup.html * https://stackoverflow.com/questions/57267594/how-to-get-privateipaddress-of-vpc-endpoint-in-cdk * https://medium.com/codex/aws-private-api-gateway-with-custom-domain-names-350fee48b406 - The approach we want in general. We're using the latest available as of this writing (AWS CDK 2.5.0)
1
answers
1
votes
12
views
asked 4 months ago
  • 1
  • 90 / page