@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:09.113Z") @Stability(value=Experimental) public interface LambdaFunctionProps extends software.amazon.jsii.JsiiSerializable, TargetBaseProps
Example:
import software.amazon.awscdk.core.*;
Function fn = Function.Builder.create(this, "MyFunc")
.runtime(Runtime.NODEJS_12_X)
.handler("index.handler")
.code(Code.fromInline("exports.handler = handler.toString()"))
.build();
Rule rule = Rule.Builder.create(this, "rule")
.eventPattern(EventPattern.builder()
.source(List.of("aws.ec2"))
.build())
.build();
Queue queue = new Queue(this, "Queue");
rule.addTarget(LambdaFunction.Builder.create(fn)
.deadLetterQueue(queue) // Optional: add a dead letter queue
.maxEventAge(Duration.hours(2)) // Optional: set the maxEventAge retry policy
.retryAttempts(2)
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
LambdaFunctionProps.Builder
A builder for
LambdaFunctionProps |
static class |
LambdaFunctionProps.Jsii$Proxy
An implementation for
LambdaFunctionProps |
| Modifier and Type | Method and Description |
|---|---|
static LambdaFunctionProps.Builder |
builder() |
default RuleTargetInput |
getEvent()
(experimental) The event to send to the Lambda.
|
getDeadLetterQueue, getMaxEventAge, getRetryAttempts@Stability(value=Experimental) @Nullable default RuleTargetInput getEvent()
This will be the payload sent to the Lambda Function.
Default: the entire EventBridge event
@Stability(value=Experimental) static LambdaFunctionProps.Builder builder()
builder in interface TargetBasePropsLambdaFunctionProps.Builder of LambdaFunctionPropsCopyright © 2022. All rights reserved.