HTTP API, ALB integration 5XX errors


Hi, I have below setup as I followed following tutorial :

customdomain ( -> HTTPAPI -> VPC Link -> ALB -> ECS


  • VPC for ALB is used
  • Subnets for ALB are added
  • Security groups for ALB is added


  • ALB is selected
  • 443 HTTPS Listener is selected
  • VPC Link is selected

Paramater Mapping for Integration:

  • path -> overwrite -> $request.path

Routing: "ANY /{proxy}" route is added and integration is attached.


  • "prod" stage is created, auto-deploy is enabled

Route53: Domain ( is added as an A record pointing to custom domain

When I make request using (same if I use auto generated stage url) I always get 503 errors. I checked and ECS instance is running properly and healthy.

Sample access log : { "requestId": "Z6KDRhh0DoEEJhg=", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36", "sourceIp": "my_ip", "requestTime": "12/Oct/2022:20:29:34 +0000", "requestTimeEpoch": "1665606574", "httpMethod": "GET", "path": "/", "status": "503", "protocol": "HTTP/1.1", "responseLength": "33", "domainName": "", "integrationError": "-", "integrationDotError": "-", "integrationStatus": "200", "integrationDotStatus": "-", "integrationDotIntegrationStatus": "200", "integrationLatency": "9001" }

What am I missing? Please help.

2개 답변
수락된 답변

I found the root cause of the 503 errors. VPC links require to use private subnets. If I put public subnets along with the private subnets it returns 503 errors most of the time. After removing public subnets from the VPC Link it is fixed.

답변함 2년 전
profile picture
검토됨 2달 전


I believe the above logs is from applicaiton load balancer access logs.

Check your Application Load Balancer access logs. Confirm that there is an elb_status_code = 503 in the logs. If you see 503 errors in any of these places, the error is generated by your Application Load Balancer.

  1. Please verify the hat the target group has registered targets
  2. Check that the traffic port and the health check port are the same.
  3. Also check all the services are running in the container
  4. It can also happen if you have the correct port configured in the health check settings, but the wrong port configured for sending actual traffic to the container.
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인