I have an AWS Lambda function that is exposed as a REST API.
When it is invoked it via the Test button on aws lambda console, it works.
When it is invoked via a online REST client, i get 403 error. It was created as requiring - no authentication (Open).
What configuration am i missing?
The HTTP 403 Forbidden error most commonly occurs when private DNS is enabled for an API Gateway interface VPC endpoint that's associated with a VPC. In this scenario, all requests from the VPC to API Gateway APIs resolve to that interface VPC endpoint.
You might encounter the 403 forbidden error when you visit an empty website directory or a specific page that has a permission error. This is because most websites are set up to disallow directory browsing to prevent attackers from accessing sensitive files.
Supposedly the Lambda is exposed through an AWS API Gateway. One reason why you'd get 403 on a fresh "no authentication" API Gateway resource is because you haven't yet deployed your changes.
In API Gateway Console click the Actions
dropdown and select Deploy API
.
You should be good to go.
Perhaps you are sending request to a wrong endpoint.
I was getting 403 error response by sending a POST request to https://example.com/locate
However, once I added stage http://example.com/dev/locate and deployed changes to this API, it worked ok, returning 200 response.
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With