1 year ago
#350829
Adnan Yaseen
Target group unhealthy for NLB
I am trying to connect Network Load Balancer with API Gateway. This is the architecture.
What has been done so far,
Created VPC with a private and public Subnet and security group with inbound traffic for both Http and Https
Created a new VPC endpoint (AWS services) and selected api-execute from services. Selected VPC, Subnet (public) and Security Group. Fill access policy has been assigned.
Created a new Target Group (IP addresses). Protocol HTTP and Port 80, With above created VPC. In the Targets added the IP of the Subnet which was assigned to the VPC endpoint above
Created a Network Load Balancer (Internet facing, IPV4, VPC and Public Subnet created above. Added a Listener on TCP 80 and assigned the Target Group created above.
Created an API Gateway with type REST API Private. Assigned the VPC Endpoint ID which was created above. Attached a resource policy to the REST API mentioned below,
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": "", "Action": "execute-api:Invoke", "Resource": "arn:aws:execute-api:us-west-2::/" }, { "Effect": "Deny", "Principal": "", "Action": "execute-api:Invoke", "Resource": "arn:aws:execute-api:us-west-2::/", "Condition": { "StringNotEquals": { "aws:SourceVpce": "{vpce id}" } } } ] }
After completing all the steps, the target group health status is unhealthy and when I try to access the Network Load Balancer using the static IP assigned to it, it give this error,
Failed to connect to **.***.***.*** port 80 after 21040 ms: Timed out
What I am missing here?
aws-api-gateway
nlb
0 Answers
Your Answer