aws-amplify / aws-amplify/amplify-hosting
Rewrite to Application Load Balancer doesn't work (I suspect its because of TLS1.3)
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
### App Id
dqbbd1fflds4t
### Region
us-east-1
### Amplify Hosting feature
Redirects
### Describe the bug
Rewrite entry on redirects doesn't work when pointing to an AWS Application Load Balancer.
### Expected behavior
Should work.
### Reproduction steps
Just hit: https://localizalia.dqbbd1fflds4t.amplifyapp.com/api/session
It's random, sometimes it works, but usually it gets stuck at the second time you try.
### Build Settings
```yaml
rewrite entry not working:
{
"source": "/api/<*>",
"target": "https://xxxxx-my-alb/api/<*>",
"status": "200",
"condition": null
}
```
### Additional information
I suspect this has to do with tls1.3 because I see it in access logs and it is not supported by ALB.
Here's the log with two requests. One times out after 300 seconds and we get a response. The other returns an error because I closed the browser. The request should return instantly.
time-to-first-byte | x-edge-detailed-result-type
-- | --
306.154 | Error
0.000 | ClientCommError
[30_3_2022-access-logs (5).csv](https://github.com/aws-amplify/amplify-hosting/files/8379368/30_3_2022-access-logs.5.csv)
Contributor guide
Research direction
Start by reproducing the rewrite at https://localizalia.dqbbd1fflds4t.amplifyapp.com/api/session using the Build Settings entry targeting the Application Load Balancer. Review the attached access-log CSV and the reported 300-second timeout, then determine whether the rewrite reliably returns the ALB response. Done means the request works consistently and promptly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100