A CloudFront Function.
import { Function } from 'aws-cdk-lib/aws-cloudfront';Or use the module namespace:
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
// cloudfront.FunctionConfiguration passed to the constructor as FunctionProps.
codeRequiredFunctionCodeThe source code of the function.
autoPublishOptionalbooleanA flag that determines whether to automatically publish the function to the LIVE stage when it’s created.
Default: - true
commentOptionalstringA comment to describe the function.
Default: - same as `functionName`
functionNameOptionalstringA name to identify the function.
Default: - generated from the `id`
keyValueStoreOptionalIKeyValueStoreRefThe Key Value Store to associate with this function. In order to associate a Key Value Store, the `runtime` must be `cloudfront-js-2.0` or newer.
Default: - no key value store is associated
runtimeOptionalFunctionRuntimeThe runtime environment for the function.
Default: FunctionRuntime.JS_1_0 (unless `keyValueStore` is specified, then `FunctionRuntime.JS_2_0`)
Everything you need to know about Amazon CloudFront on one page. HD quality, print-friendly.
Download Free Infographicaws-cloudfront