aws-amplify / aws-amplify/amplify-hosting

403 ERROR The request could not be satisfied getting this error with amplify cloudfront

Open
#3,968 1 comment 0 reactions 0 assignees View on GitHub
feature-request
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 removed any sensitive information from my code snippets and submission.

### Amplify Hosting feature

Redirects

### Is your feature request related to a problem? Please describe:

I have an nginx proxy server hosted on ec2 and my nextjs fronted app is hosted on amplify, I am trying to redirect /logon/ traffic from the nginx reverse proxy server to amplify hosted frontend, but I am receiving the below error in the browser.

```
403 ERROR
The request could not be satisfied.
Bad request. 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.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
Generated by cloudfront (CloudFront)
Request ID: __pMn8va2knwTcZNHz4DiUNuUelp3YBBNGKiWPQIUpdXWdG18D-Xvg== getting this error in the browser
```
I am passing proxy pass value as amplify custom domain

ex : proxy_pass https://amplify-custom-domain

### Describe how you'd like this feature to work

I want when the request comes to the reverse proxy server, it redirects to aws amplify domain.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the nginx reverse-proxy configuration, especially the proxy_pass value for /logon/, alongside the Amplify custom domain and the reported CloudFront 403 response. Compare the setup with the relevant Amplify Hosting and CloudFront troubleshooting guidance; done means requests to /logon/ reach the Amplify-hosted Next.js frontend without the 403 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, nextjs, nginx
Domain
cloud, devops, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.