AWS Serverless 403 Forbidden API Gateway


Abi Gulala

I am trying to create a serverless Nodejs application. I deployed the app to S3 and it's working. But the url seems to be https://xxxxxxxx.xxxxx-api.us-west-2.amazonaws.com/prod . So whenever my app tries to get a css file or a video file or even a link, they go to the URL / which is perfect. But the url here is URL/prod and should be like URL/prod/what-route-it-is. So my static files are not being rendered and even linking is not working. Is there any way to reroute to url/prod or remove prod from api endpoint?

Jorge Garcia

AWS API Gateway follows the following pattern in URLs:

www.example.com/my-base-path/MyStage

You must configure each section accordingly. For example, you could create the base route "prod" and do the following in the "whatever-route-it-is" stage:

www.example.com/prod/everever-route-it-is

Base path mapping is configured under Custom Domain Name.

Related


AWS Serverless 403 Forbidden API Gateway

Abi Gulala I am trying to create a serverless Nodejs application. I deployed the app to S3 and it's working. But the url seems to be https://xxxxxxxx.xxxxx-api.us-west-2.amazonaws.com/prod . So whenever my app tries to get a css file or a video file or even a

AWS Serverless 403 Forbidden API Gateway

Abi Gulala I am trying to create a serverless Nodejs application. I deployed the app to S3 and it's working. But the url seems to be https://xxxxxxxx.xxxxx-api.us-west-2.amazonaws.com/prod . So whenever my app tries to get a css file or a video file or even a

AWS Serverless 403 Forbidden API Gateway

Abi Gulala I am trying to create a serverless Nodejs application. I deployed the app to S3 and it's working. But the url seems to be https://xxxxxxxx.xxxxx-api.us-west-2.amazonaws.com/prod . So whenever my app tries to get a css file or a video file or even a

AWS Serverless 403 Forbidden API Gateway

Abi Gulala I am trying to create a serverless Nodejs application. I deployed the app to S3 and it's working. But the url seems to be https://xxxxxxxx.xxxxx-api.us-west-2.amazonaws.com/prod . So whenever my app tries to get a css file or a video file or even a

Receive 403 Forbidden from custom domain in AWS Api Gateway

Philip Firmiano I am trying to build a serverless application using AWS. My API is working fine but my custom domain is not. I got a 403 Forbidden answer. Here's how to configure a custom domain: Then I use the destination URL provided by this custom domain in

Receive 403 Forbidden from custom domain in AWS Api Gateway

Philip Firmiano I am trying to build a serverless application using AWS. My API is working fine but my custom domain is not. I got a 403 Forbidden answer. Here's how to configure a custom domain: Then I use the destination URL provided by this custom domain in

Receive 403 Forbidden from custom domain in AWS Api Gateway

Philip Firmiano I am trying to build a serverless application using AWS. My API is working fine but my custom domain is not. I got a 403 Forbidden answer. Here's how to configure a custom domain: Then I use the destination URL provided by this custom domain in

Receive 403 Forbidden from custom domain in AWS Api Gateway

Philip Firmiano I am trying to build a serverless application using AWS. My API is working fine but my custom domain is not. I got a 403 Forbidden answer. Here's how to configure a custom domain: Then I use the destination URL provided by this custom domain in

API Gateway returns 403 - Forbidden

Tefard I have an API Gateway with an endpoint implemented by AWS Lambda proxy integration. I have also configured a custom authorizer for this endpoint. I'm seeing an issue where the first request I make to this endpoint is successful, but other calls will fai

API Gateway returns 403 - Forbidden

Tefard I have an API Gateway with an endpoint implemented by AWS Lambda proxy integration. I have also configured a custom authorizer for this endpoint. I'm seeing an issue where the first request I make to this endpoint is successful, but other calls will fai

API Gateway returns 403 - Forbidden

Tefard I have an API Gateway with an endpoint implemented by AWS Lambda proxy integration. I have also configured a custom authorizer for this endpoint. I'm seeing an issue where the first request I make to this endpoint is successful, but other calls will fai

API Gateway returns 403 - Forbidden

Tefard I have an API Gateway with an endpoint implemented by AWS Lambda proxy integration. I have also configured a custom authorizer for this endpoint. I'm seeing an issue where the first request I make to this endpoint is successful, but other calls will fai

AWS Serverless Architecture – Why Use an API Gateway?

Rudo Here is my use case: Static React frontend hosted on S3 Python backend conducts long-running data analysis based on Lambda Postgres database on RDS Backend and frontend only communicate with JSON The backend sometimes creates and stores Powerpoint files i

AWS Cloudfront API endpoint responds with Forbidden (403)

Kuldeep Yadav I have a lambda function behind an api gateway. This method works fine when triggered with the Invoke URL . The calling URL is the link provided in the "Methods" tab in the stage. I send request to resource as below and it works fine. I want to s

AWS Cloudfront API endpoint responds with Forbidden (403)

Kuldeep Yadav I have a lambda function behind an api gateway. This method works fine when triggered with the Invoke URL . The calling URL is the link provided in the "Methods" tab in the stage. I send request to resource as below and it works fine. I want to s

AWS API Gateway - Private Endpoint - Forbidden Message

ml I am trying to setup a private AWS API Gateway and connect to it from my laptop. The laptop is in a network connected to a private VPC via AWS Direct Connect. I am using the toy example "PetStore" API provided by AWS for this. According to this guide : Esta

AWS API Gateway - Private Endpoint - Forbidden Message

ml I am trying to setup a private AWS API Gateway and connect to it from my laptop. The laptop is in a network connected to a private VPC via AWS Direct Connect. I am using the toy example "PetStore" API provided by AWS for this. According to this guide : Esta

AWS API Gateway - Private Endpoint - Forbidden Message

ml I am trying to setup a private AWS API Gateway and connect to it from my laptop. The laptop is in a network connected to a private VPC via AWS Direct Connect. I am using the toy example "PetStore" API provided by AWS for this. According to this guide : Esta

AWS API Gateway - Private Endpoint - Forbidden Message

ml I am trying to setup a private AWS API Gateway and connect to it from my laptop. The laptop is in a network connected to a private VPC via AWS Direct Connect. I am using the toy example "PetStore" API provided by AWS for this. According to this guide : Esta

AWS API Gateway - Private Endpoint - Forbidden Message

ml I am trying to setup a private AWS API Gateway and connect to it from my laptop. The laptop is in a network connected to a private VPC via AWS Direct Connect. I am using the toy example "PetStore" API provided by AWS for this. According to this guide : Esta

AWS API Gateway 403 error with custom authorizer

Akshay I am using Claudia-api-builder to create and deploy. https://github.com/claaudiajs/example-projects/tree/master/custom-authorizers My AWS custom authorizer looks like this: let jwtDecode = require('jwt-decode'); var generatePolicy = function (authToken

Custom Domain AWS API - Gateway 403

fast The custom domain is mapped with AWS API-Gateway, randomly using my custom domain gives the following error. <html> <body> <h1>403 Forbidden</h1> Request forbidden by administrative rules. </body> </html> I've tried different domain mappi

AWS API Gateway 403 error with custom authorizer

Akshay I am using Claudia-api-builder to create and deploy. https://github.com/claaudiajs/example-projects/tree/master/custom-authorizers My AWS custom authorizer looks like this: let jwtDecode = require('jwt-decode'); var generatePolicy = function (authToken