[proposal] Add support for throttling per route
Author: jameslsCreated Nov 17, 2017Updated Jan 3, 2026
Labelsproposals
API Gateway has various forms of API throttling. This proposal adds support for throttling at the routing level. This allows you to specify a rate and burst limit per @app.route.
Similar to CORS and authorizers, there will be a new param, throttle, that takes an instance of ThrottleConfig:
@app.route('/', throttle=ThrottleConfig(rate=10, burst=15))
def index(): passThrottleConfig accepts two arguments, rate and burst:
class ThrottleConfig(object):
def __init__(self, rate: int, burst: int): passThe rate and burst params map to the corresponding concepts described in the API Gateway throttling docs
Source: aws/chalice