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 réponses
Réponse acceptée

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.

répondu il y a 2 ans
profile picture
vérifié il y a 20 heures
profile picture
vérifié il y a 2 mois


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.
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions