Cloudfront does not forward query string to API Gateway – HTTP API
Dear All,
This is my diagram:
Client
|
Cloudfront:443 (All headers – All query string – All cookies) – Domain + ACM SSL: abc.com
|
APIGateway HTTP API – ANY /{proxy+} – Custom domain + ACM SSL: abc.com
|
VPC links
|
ALB Internal
|
EC2
When I tried to request the API URL :
abc.com/info/list?page=1&count=2
=> Not successful and met an error: We can’t connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner
I checked and realized the query string is not forwarded to the API Gateway.
*Cloudfront logs:
/info 403 - GuzzleHttp/7 - - Error - ..... - TLSv1.3 TLS_AES_128_GCM_SHA256 Error HTTP/1.1 - - 36757 0.000 InvalidRequest text/html 915
=> Not found query string
I also tried with another API URL: /services?page=1&count=2 not met error 403 but Log’s Cloudfront function not found query string
- Cloudfront function logs :
{method:"GET",uri:"/services",querystring:{},headers:{x-amz-date:{value:"20250421T091948Z"}
=> Not found query string
Please support me in resolving this issue.
Thank you so much.
Read more here: Source link
