Skip to main content

ResourceBuilder

Constructor​

Advanced API

Use LambdaApi with LambdaApiConfig for new applications. ResourceBuilder is the lower-level build API used internally by LambdaApiConfig snapshots.

Public operations​

build​

build(construct, api_resource, lambda_path: str,
print_tree: bool = False,
source_layout: SourceLayout = SourceLayout.ROOT,
layers_path: Optional[str] = None)
build_http(construct, http_api, lambda_path: str,
print_tree: bool = False,
source_layout: SourceLayout = SourceLayout.ROOT,
layers_path: Optional[str] = None)

build discovers one-route handlers and emits REST resources. build_http emits HTTP API routes for GET, POST, PUT, and DELETE; ANY has no HTTP mapping. Both accept SourceLayout.ROOT or SourceLayout.SERVICE, prepare layers, create Lambda functions, and emit the consolidated authorization, execution-role, VPC, and shared-role diagnostics described in the configuration reference.

The builder's runtime aliases are exactly python3.10, python3.11, python3.12, python3.13, and python3.14. Missing registry references raise KeyError naming the registry and key. Prefer constructor registries on LambdaApiConfig; this page intentionally does not expand lower-level mutable implementation details.