Monitoring-Mtl / Bixi-Api

REST API for querying public Bixi data aggregated over time in `Monitoring-Mtl`
0 stars 0 forks source link

Incorrect FastAPI `root_path` Configuration Leads to 404 Errors on AWS in `Bixi-Api` #17

Closed k-allagbe closed 6 months ago

k-allagbe commented 6 months ago

Bug Report

Description: After deploying the Bixi-Api on AWS, we encountered 404 errors when attempting to access the application's endpoints. The root cause was identified as the root_path setting in FastAPI not being configured to align with the AWS API Gateway prod stage URL.

Steps to Reproduce:

  1. Deploy Bixi-Api using the current configuration to AWS.
  2. Attempt to access any endpoint (e.g., /health) using the deployed API's URL.
  3. Observe the 404 error.

Expected Behavior: The application should respond to requests at all configured endpoints without any 404 errors, similar to the local testing environment.

Actual Behavior: All attempts to access the endpoints resulted in 404 errors, indicating a mismatch between the expected URL path handled by FastAPI and the actual path as configured in AWS API Gateway.

Screenshots:

Additional Information:

Checklist