Interview Prep/AWS/Route 53, CloudFront, API Gateway and Messaging

Calling your API returns `{"message":"Missing Authentication Token"}`.

BeginnerTroubleshootingRoute 53, CloudFront, API Gateway and Messaging
Answer

Likely causes → Despite the name, this almost always means the route does not exist: a wrong path or method, a missing stage in the URL (/prod/orders), or the API was not deployed after the change (REST APIs need a deployment).

Diagnose →

aws apigateway get-resources --rest-api-id abc123 --query 'items[].[path,resourceMethods]'
aws apigateway get-stages --rest-api-id abc123 --query 'item[].[stageName,deploymentId,lastUpdatedDate]'
curl -i https://abc123.execute-api.us-east-1.amazonaws.com/prod/orders

Fix →

  1. Call the correct stage, path and method
  2. Redeploy: aws apigateway create-deployment --rest-api-id abc123 --stage-name prod

Prevent → Deploy APIs through IaC, which creates deployments automatically, and add a smoke test per route after each deploy.

aws All AWS questions Roadmap: AWS core services

More on Route 53, CloudFront, API Gateway and Messaging