Turn off (Disable) individual API in API Gateway temporarily without Deleting?


Is it possible in AWS API Gateway to “turn off”/”disable” an API in API Gateway, without deleting the API itself? I’m hoping to keep the configuration of an API, without losing it through the otherwise deletion I’m hoping to avoid; that would also have the beneficial parallel motivation of preventing AWS billed API usage.

Is it possible, or is delete the only option?


There is no disable button, but there are two possibilities that can be considered as a workaround:

  1. Delete the API stage(s). Without stage, API wont be accessible.
  2. Since one can be problematic if there are multiple stages with lots of custom setttings, you can add Deny resource base policy to the API.

The policy will Deny all invocations of the API, making it effectively disabled. But the invocations will still count towards API usage.

Leave a Reply