API hosted on railway throws error on API Request to my Lambda


Hello I'm making a simple API request to my lambda endpoint from another server that's hosted on railway.app and everytime I make a request to my lambda I get the following error.

<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
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.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
Generated by cloudfront (CloudFront)
Request ID: _-bskwhg7aCgBL3YAH7_MazAyGiMiE1dfA5i7xa1wg_uRvNzMFVTiQ==

this is just an snippet of the request error from an axios request from my server to my lambda

I haven't used cloudfront before nor have I configured anything to use Cloudfront, I used the Serverless package for typescript to create an S3 bucket for my API, and I don't know how to resolve this issue, because the same request I'm making from my railway server can be completed by using a get request with postman.

Any help would be greatly appreciated

1 Answer

It looks as though you were using an edge-optimized API gateway which automatically configures CloudFront for you. I would suggest checking your API Gateway logs to find out why it was returning a 403 error.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions