@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-20T00:39:28.612Z") @Stability(value=Experimental) public class LambdaFunction extends Component
To use this, create an AWS Lambda handler file under your source tree with
the .lambda.ts extension and add a LambdaFunction component to your
typescript project pointing to this entrypoint.
This will add a task to your "compile" step which will use esbuild to
bundle the handler code into the build directory. It will also generate a
file src/foo-function.ts with a custom AWS construct called FooFunction
which extends @aws-cdk/aws-lambda.Function which is bound to the bundled
handle through an asset.
Example:
// Example automatically generated from non-compiling source. May contain errors.
new LambdaFunction(myProject, {
srcdir: myProject.srcdir,
entrypoint: 'src/foo.lambda.ts',
});
| Modifier and Type | Class and Description |
|---|---|
static class |
LambdaFunction.Builder
(experimental) A fluent builder for
LambdaFunction. |
| Modifier | Constructor and Description |
|---|---|
protected |
LambdaFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
LambdaFunction(software.amazon.jsii.JsiiObjectRef objRef) |
|
LambdaFunction(Project project,
LambdaFunctionOptions options)
(experimental) Defines a pre-bundled AWS Lambda function construct from handler code.
|
getProject, postSynthesize, preSynthesize, synthesizejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected LambdaFunction(software.amazon.jsii.JsiiObjectRef objRef)
protected LambdaFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public LambdaFunction(@NotNull
Project project,
@NotNull
LambdaFunctionOptions options)
project - The project to use. This parameter is required.options - Options. This parameter is required.Copyright © 2021. All rights reserved.