My frontend uses nextjs 14 with a Docker file, github actions build and push the docker image to aws ECR, cloudformation retrieve the docker image from ECR and create lambda function and its integrated api gateway. With the url from stage of api gateway, I can access the page, but when navigate to another page from e.g homepage, I got {“message”:”Forbidden”} shown in the browser instead of the real page. And the same for other page i.e if I access the page via the url provided by api gateway stage, I can access the page, but if e.g I navigate to homepage, I got {“message”:”Forbidden”} again.
In summary, I can only access the page via the url provided by api gateway stage, but not a page navigated from that page.
Anyone knows why and how to fix it?
i tried for couple of hours, but still cannot solve it
AdiddaQq is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.