Background
PR #209 dropped serverless-api-gateway-throttling (commit 4738a3b) because the plugin is unmaintained and incompatible with osls v4 (its post-deploy updateStage hook calls the removed provider.request() API and fails the deploy).
It had configured a default stage throttle:
apiGatewayThrottling:
maxRequestsPerSecond: 200
maxConcurrentRequests: 100
Problem
The plugin applied that throttle via a post-deploy API call, not CloudFormation. Because it's a sticky API Gateway stage setting, existing dev/prod stages keep the 200/100 limit - but it is no longer declared anywhere in the repo.
If a stage is ever recreated from scratch, the 200 rps / 100 burst throttle is gone and won't be reapplied; we'd fall back to account-level API Gateway limits only.
Task
Re-declare the stage-level default throttle in code so it survives a rebuild. Options to investigate:
- Attach
MethodSettings (ThrottlingRateLimit / ThrottlingBurstLimit) via a CloudFormation resources override. osls v4 emits no AWS::ApiGateway::Stage resource, so this may need a custom stage/deployment resource.
- A maintained alternative plugin compatible with osls v4.
Verify with sls package that tables and ApiGatewayRestApi show UPDATE / no change (never REPLACE/DELETE) per the deploy guardrails in AGENTS.md.
Related: #209
Background
PR #209 dropped
serverless-api-gateway-throttling(commit 4738a3b) because the plugin is unmaintained and incompatible with osls v4 (its post-deployupdateStagehook calls the removedprovider.request()API and fails the deploy).It had configured a default stage throttle:
Problem
The plugin applied that throttle via a post-deploy API call, not CloudFormation. Because it's a sticky API Gateway stage setting, existing
dev/prodstages keep the 200/100 limit - but it is no longer declared anywhere in the repo.If a stage is ever recreated from scratch, the 200 rps / 100 burst throttle is gone and won't be reapplied; we'd fall back to account-level API Gateway limits only.
Task
Re-declare the stage-level default throttle in code so it survives a rebuild. Options to investigate:
MethodSettings(ThrottlingRateLimit / ThrottlingBurstLimit) via a CloudFormationresourcesoverride. osls v4 emits noAWS::ApiGateway::Stageresource, so this may need a custom stage/deployment resource.Verify with
sls packagethat tables andApiGatewayRestApishow UPDATE / no change (never REPLACE/DELETE) per the deploy guardrails in AGENTS.md.Related: #209