OptionalaccessThe API-GW access logs for the $default stage are kept.
This has options for the logs.
OptionalcorsSets CORS headers on responses from the API Gateway to allow all origins, headers and methods. Useful if your API should be accessed by any browser.
OptionaldefaultIf no authorization is specified for a route, this authorization is used.
See AuthorizationProps for the available options.
OptionaldefaultIf no integration is specified for a route, this integration is used.
See IntegrationProps for the available options.
OptionaldetailedSet to false to disable route-level metrics. This can increase CloudWatch costs when not disabled.
See AWS: Working with metrics for HTTP APIs for more info.
Settings for the external-facing part of the API-GW.
OptionalpropsIf some settings in this construct do not work for you, this is an escape hatch mechanism to override anything.
OptionalhttpApi?: Partial<apigw.HttpApiProps>Override settings for the apigw.HttpApi (accessible in ApiGateway.httpApi).
For example, if you have a frontend accessing this API, you might want to set CORS preflight settings.
OptionalthrottlingThrottling of requests. If not set, the AWS default of 5000 burst and 10000 rate is used.
The default throttling is per-account, and counts all APIs in the account and region. If you have another API in this region getting 10_000 request rate, it may impact this API as well.
Optionalburst?: numberGoing over 5_000 may require you to contact AWS Support - they are account bound.
Optionalrate?: numberGoing over 10_000 may require you to contact AWS Support - they are account bound.
Props for the ApiGateway construct.
Author
Kristian Rekstad kre@capraconsulting.no
Author
Hermann Mørkrid hem@liflig.no