overcast local AWS emulator

Service Reference

API Gateway — Amazon API Gateway

API Gateway (REST v1 and HTTP v2) uses a REST API with path-based routing. REST API v1 is mounted at /restapis, HTTP API v2 at /v2/apis.

API Gateway — Amazon API Gateway

AWS docs: https://docs.aws.amazon.com/apigateway/latest/api/Welcome.html

API Gateway (REST v1 and HTTP v2) uses a REST API with path-based routing. REST API v1 is mounted at /restapis, HTTP API v2 at /v2/apis.


Known limitations

  • No VTL template mapping. Integration request/response templates are not evaluated as VTL — values are passed through as-is.
  • Partial authorizer enforcement. COGNITO_USER_POOLS (REST v1) and JWT (HTTP v2) authorizers are validated (RS256 signature + expiry + issuer/audience). Lambda (TOKEN, REQUEST) and IAM authorizers are stored but not enforced at request time.
  • No request validation. Request validators are stored but not enforced at request time.
  • No WebSocket execution. WEBSOCKET protocol type is accepted on creation but execution is not implemented.
  • Usage counters are not persisted. Quota and throttle state lives in memory so the request path never hits the store; restarting Overcast resets it. Real API Gateway carries a quota across the whole period.
  • Usage plans only apply to REST v1. As on AWS, HTTP APIs (v2) have no API-key or usage-plan concept, so nothing is measured or enforced there.

Usage plan throttling and quotas

A method with apiKeyRequired: true resolves the caller’s x-api-key to an API key and to the usage plan covering {restApiId, stage} — a request with no such plan is already refused with 403 Forbidden. Once the plan is found, its limits are measured on every request:

  • Throttlethrottle.rateLimit is the tokens-per-second refill and throttle.burstLimit the bucket capacity, the token-bucket model AWS documents. The bucket is per (usage plan, API key), not per plan.
  • Quotaquota.limit requests per quota.period (DAY, WEEK, MONTH) in calendar-aligned UTC windows; quota.offset is subtracted from the limit in the first period only. Windows roll over on the injected clock, so tests can fast-forward them.

Read the counters back with GetUsage, which returns AWS’s daily [used, remaining] log per API key (a date range wider than 400 days is refused with BadRequestException — AWS documents no such cap, but the response carries one entry per day per key). Reaching a limit also logs a warning and publishes an apigateway:Throttled event — visible on the web UI’s Events page and on the Usage Plans page — coalesced to at most one per key per second.

Rejection is opt-in and off by default. Overcast is not a rate-limiting or load-testing tool, and switching enforcement on can turn a local stack that works today into one that gets 429s it never used to. So by default an over-limit request is counted, reported, and then served normally. Set OVERCAST_ENFORCE_APIGATEWAY_THROTTLE=true to have over-limit requests rejected the way AWS rejects them:

ConditionStatusx-amzn-ErrorTypeBody
Rate/burst exceeded (THROTTLED)429TooManyRequestsException{"message":"Too Many Requests"}
Quota exhausted (QUOTA_EXCEEDED)429LimitExceededException{"message":"Limit Exceeded"}

A rejected request consumes neither quota nor a token, matching AWS — a 429 does not count against the usage plan quota. A plan configuring neither a throttle nor a quota never rejects anything, whatever the flag says.

Invoke URLs

REST v1 and HTTP v2 APIs are reachable two ways, with identical behaviour:

  • Path-stylehttp://localhost:4566/restapis/{apiId}/{stage}/_user_request_/...
  • Host-routedhttp://{apiId}.execute-api.{region}.{base}/{stage}/..., the shape real AWS uses. {base} is whatever hostname you reached Overcast on; set OVERCAST_HOSTNAME=localhost.overcast.sh so it resolves on every OS.

HTTP v2 APIs report the host-routed form in apiEndpoint, minted on the hostname you called Overcast on rather than amazonaws.com, so CloudFormation’s Fn::GetAtt ApiEndpoint returns a URL you can dial. REST v1 has no such field, matching AWS — the console composes it client-side, and it composes the host-routed form too, falling back to path-style only when the endpoint it is connected to cannot carry a subdomain (a bare localhost, or an IP). That is the URL its copy button yields.

Stack outputs that compose an invoke URL in the template (as CDK does) are also re-hosted onto a reachable origin when returned by DescribeStacks. See networking.md.

Summary

Category✅ Supported❌ Unsupported
REST API v1 management24
REST API v1 stages7
REST API v1 other342
HTTP API v2 management15
HTTP API v2 stages6
HTTP API v2 other17
REST API v1 execution1

Endpoints

REST API v1 management

OperationStatusNotesAWS Docs
CreateRestApi✅ SupportedCreates API with root / resource; default EDGE endpoint typedocs
GetRestApi✅ Supporteddocs
GetRestApis✅ SupportedPagination not yet implementeddocs
DeleteRestApi✅ SupportedCascade deletes resources, stages, and deploymentsdocs
UpdateRestApi✅ SupportedPatch /name, /description, /policy, /disableExecuteApiEndpointdocs
CreateResource✅ SupportedComputes full path from parent chaindocs
GetResource✅ Supporteddocs
GetResources✅ SupportedPagination not yet implementeddocs
DeleteResource✅ Supporteddocs
UpdateResource✅ SupportedPatch /pathPartdocs
PutMethod✅ Supporteddocs
GetMethod✅ Supporteddocs
DeleteMethod✅ Supporteddocs
UpdateMethod✅ SupportedPatch /authorizationType, /authorizerId, /apiKeyRequireddocs
PutIntegration✅ SupportedAWS_PROXY/MOCK/HTTP_PROXY/HTTP/AWS types; uri, httpMethoddocs
GetIntegration✅ Supporteddocs
DeleteIntegration✅ Supporteddocs
UpdateIntegration✅ SupportedPatch integrationType, integrationUri, payloadFormatVersiondocs
PutMethodResponse✅ Supporteddocs
GetMethodResponse✅ Supporteddocs
DeleteMethodResponse✅ Supporteddocs
PutIntegrationResponse✅ SupportedresponseTemplates, selectionPatterndocs
GetIntegrationResponse✅ Supporteddocs
DeleteIntegrationResponse✅ Supporteddocs

REST API v1 stages

OperationStatusNotesAWS Docs
CreateDeployment✅ Supporteddocs
GetDeployments✅ Supporteddocs
CreateStage✅ SupportedLinks to a deploymentdocs
GetStage✅ Supporteddocs
GetStages✅ Supporteddocs
UpdateStage✅ SupportedPatch /description, /deploymentId, and per-key /variables/{name} (replace/add/remove); MethodSettings, TracingEnabled, AccessLogSetting, CacheClusterEnabled/Size, ClientCertificateId, DocumentationVersion not implementeddocs
DeleteStage✅ Supporteddocs

REST API v1 other

OperationStatusNotesAWS Docs
CreateModel✅ Supportedid, name, contentType, schema, descriptiondocs
GetModel✅ Supporteddocs
GetModels✅ Supporteddocs
DeleteModel✅ Supporteddocs
CreateAuthorizer✅ SupportedJWT and REQUEST types; config storeddocs
GetAuthorizer✅ Supporteddocs
GetAuthorizers✅ Supporteddocs
DeleteAuthorizer✅ Supporteddocs
CreateRequestValidator✅ SupportedvalidateRequestBody, validateRequestParamsdocs
GetRequestValidators✅ Supporteddocs
DeleteRequestValidator✅ Supporteddocs
CreateApiKey✅ Supportedauto-generated key valuedocs
GetApiKey✅ Supporteddocs
GetApiKeys✅ Supporteddocs
DeleteApiKey✅ Supporteddocs
CreateUsagePlan✅ Supportedthrottle (token bucket) and quota measured per API key; rejection needs OVERCAST_ENFORCE_APIGATEWAY_THROTTLEdocs
GetUsagePlan✅ Supporteddocs
GetUsagePlans✅ Supporteddocs
DeleteUsagePlan✅ Supporteddocs
CreateUsagePlanKey✅ Supporteddocs
GetUsagePlanKeys✅ Supporteddocs
DeleteUsagePlanKey✅ Supporteddocs
GetUsage✅ Supporteddaily [used, remaining] log per API key; counts are in-memory and reset on restartdocs
CreateDomainName✅ SupportedInert metadata; no routing effectdocs
GetDomainNames✅ Supporteddocs
DeleteDomainName✅ Supporteddocs
CreateBasePathMapping✅ SupportedStored under the domain namedocs
GetBasePathMappings✅ Supporteddocs
CreateVpcLink✅ SupportedStatus immediately AVAILABLE; no VPC connectivity enforceddocs
GetVpcLinks✅ Supporteddocs
DeleteVpcLink✅ Supporteddocs
TagResource✅ SupportedPUT /tags/{arn} — merges tags; ARN may contain slashesdocs
UntagResource✅ SupportedDELETE /tags/{arn}?tagKeys=k1,k2docs
GetTags✅ Supporteddocs
GetAccount❌ Unsupporteddocs
UpdateAccount❌ Unsupporteddocs

HTTP API v2 management

OperationStatusNotesAWS Docs
CreateV2Api✅ SupportedHTTP and WEBSOCKET protocol types; default route selectiondocs
GetV2Api✅ Supporteddocs
GetV2Apis✅ SupportedPagination not yet implementeddocs
UpdateV2Api✅ Supporteddocs
DeleteV2Api✅ SupportedCascade deletes routes, integrations, stages, deploymentsdocs
CreateV2Route✅ Supporteddocs
GetV2Route✅ Supporteddocs
GetV2Routes✅ Supporteddocs
DeleteV2Route✅ Supporteddocs
UpdateV2Route✅ SupportedPatch routeKey, target, authorizationTypedocs
CreateIntegration✅ SupportedAWS_PROXY / HTTP_PROXY types; payloadFormatVersion 1.0/2.0docs
GetV2Integration✅ Supporteddocs
GetV2Integrations✅ Supporteddocs
DeleteIntegration✅ Supporteddocs
UpdateIntegration✅ SupportedPatch integrationType, integrationUri, payloadFormatVersiondocs

HTTP API v2 stages

OperationStatusNotesAWS Docs
CreateV2Deployment✅ Supporteddocs
GetV2Deployments✅ Supporteddocs
CreateV2Stage✅ Supporteddocs
GetV2Stage✅ Supporteddocs
GetV2Stages✅ Supporteddocs
DeleteV2Stage✅ Supporteddocs

HTTP API v2 other

OperationStatusNotesAWS Docs
UpdateV2Stage✅ SupportedPatch description, autoDeploy, deploymentId, stageVariablesdocs
CreateV2Authorizer✅ SupportedJWT and REQUEST types; config storeddocs
GetV2Authorizer✅ Supporteddocs
GetV2Authorizers✅ Supporteddocs
DeleteV2Authorizer✅ Supporteddocs
CreateV2DomainName✅ SupportedInert metadata; no routing effectdocs
GetV2DomainNames✅ Supporteddocs
DeleteV2DomainName✅ Supporteddocs
CreateV2VpcLink✅ SupportedStatus immediately AVAILABLE; no VPC connectivity enforceddocs
GetV2VpcLinks✅ Supporteddocs
DeleteV2VpcLink✅ Supporteddocs
CreateV2ApiMapping✅ SupportedStored under the domain namedocs
GetV2ApiMappings✅ Supporteddocs
TagV2Resource✅ SupportedPOST /v2/tags/{arn} — merges tags; ARN may contain slashesdocs
UntagV2Resource✅ SupportedDELETE /v2/tags/{arn}?tagKeys=k1,k2docs
GetV2Tags✅ Supporteddocs
ExecuteV2API✅ SupportedAWS_PROXY and HTTP_PROXY integration types; records the same Count/4xx/5xx/Latency/IntegrationLatency metrics (HTTP APIs use AWS’s lowercase 4xx/5xx metric names, not REST’s 4XXError/5XXError) under all three AWS-documented HTTP dimension combinations — ApiId, ApiId+Stage, and ApiId+Stage+HttpMethod+RouteKeydocs

REST API v1 execution

OperationStatusNotesAWS Docs
ExecuteRestAPI✅ SupportedLambda proxy/non-proxy, HTTP_PROXY, HTTP, and MOCK integrations; stage variable substitution; base64 Lambda responses decoded before write; records AWS/ApiGateway CloudWatch metrics Count, 4XXError, 5XXError, Latency, and IntegrationLatency once per dispatched request under all three AWS-documented REST dimension combinations — ApiName, ApiName+Stage, and ApiName+Stage+Method+Resource (service-metrics-platform.md phase 2, #1307) — an unresolvable restApiId records nothing, since there is no ApiName to dimension a series withdocs