WebFunctionEndpointOptions Struct Added in v2.276.0
Settings of a WebFunction endpoint.
Example
declare const fn: lambda.WebFunction;
const internal = fn.addEndpoint('Internal', {
authType: lambda.WebFunctionAuthType.IAM_AUTH,
});
Properties
authTypeWebFunctionAuthTypeauth_typeWebFunctionAuthTypeauthTypeWebFunctionAuthTypeAuthTypeWebFunctionAuthTypeAuthTypeWebFunctionAuthTyperequired#notes
There is no default: you must choose explicitly so an endpoint is never accidentally public or accidentally locked down. Specify WebFunctionAuthType.IAM_AUTH (Lambda authorizes requests with SigV4/IAM) or WebFunctionAuthType.APPLICATION_MANAGED (the endpoint is public and your function handles authorization).
With IAM_AUTH, requests must be signed with SigV4 and carry the X-Amz-Content-SHA256 header, also for a request without a body; without it the endpoint returns 403 even for a valid signature. A MULTI_REGION endpoint is signed with SigV4a, for the Region set *.
endpointDescriptionoptionalstringendpoint_descriptionoptionalstrendpointDescriptionoptionalStringEndpointDescriptionoptionalstringEndpointDescriptionoptional*string#Default: No description.
Up to 256 characters.
endpointLocationoptionalWebFunctionEndpointLocationendpoint_locationoptionalWebFunctionEndpointLocationendpointLocationoptionalWebFunctionEndpointLocationEndpointLocationoptionalWebFunctionEndpointLocationEndpointLocationoptionalWebFunctionEndpointLocation#Default: WebFunctionEndpointLocation.homeRegion()
Changing it replaces the endpoint, which yields a new domainName. If you set endpointName, change it at the same time.
endpointNameoptionalstringendpoint_nameoptionalstrendpointNameoptionalStringEndpointNameoptionalstringEndpointNameoptional*string#Default: for the endpoint a WebFunction creates, prod in the home Region and, for a regional endpoint, prod- followed by a hash of its location; for any other endpoint, a name derived from its construct path and location
notes
Must be 2 to 64 characters of letters, numbers, hyphens or underscores, starting and ending with a letter or number.
Changing this property replaces the endpoint, which yields a new domainName.
endpointLocation also replaces the endpoint when it changes, and CloudFormation cannot replace a resource that keeps its name. Without this property the name is derived from the location, so that works. With it, change the name together with the location, or the deployment fails.
maxEnvironmentsoptionalnumbermax_environmentsoptionalint | floatmaxEnvironmentsoptionalNumberMaxEnvironmentsoptionaldoubleMaxEnvironmentsoptional*float64#Default: Scaling is limited only by your account's vCPU quota.
This is an optional cap on top of your account's vCPU quota, not a reservation: it further constrains how far the endpoint scales. Must be 2 or greater.
rateLimitoptionalnumberrate_limitoptionalint | floatrateLimitoptionalNumberRateLimitoptionaldoubleRateLimitoptional*float64#Default: The request rate is limited only by your account's rate limit quota.
notes
This is an optional cap on top of your account's rate limit quota. Specify 0 to reject all new requests.
The service accepts only certain values: 0, 100 through 1000 in increments of 100, and 2000 through 10000 in increments of 1000. Which of those are available varies by Region, and an unsupported value is rejected at deploy time with the values that Region does accept. Only the lower bound is checked at synth, since the schema declares nothing more.