Search code examples
amazon-web-servicesaws-api-gatewayawsdeploy

AWS throws An Unknown error occurred while deploying API Gateway


In AWS API Gateway I am trying to deploy API to new stage, and im getting error "An unknown error occurred". I am assuming it most likely because of permission. But i have API Gateway administrator permissions. How do find out exactly which permissions are missing? Does aws api gateway logs any deployment related events? Where do i find whats going on.

enter image description here


Solution

  • Answering your question of Api Gateway deployment events, below are typical steps I do on what's happening.

    1. Any operation you perform on Console or SDK is essentially calling AWS APIs.
    2. For Console failures, you can always check on client side by going to Developer Tools provided by browsers. Typically F12 key --> Network tab, replicate the issue and see which AWS Endpoint gave error or go to Console tab and see any JavaScript errors logged.
    3. If I am still not able to determine the cause, I enable CloudTrail logs and see which user and which API call gave any error responses for which operation. CloudTrail Guide to ApiGateway.
    4. If there is specific role or policy issue having issue, I use Policy Simulator to test policies for the role once permissions are added.