@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.329Z") @Stability(value=Stable) public interface LambdaFunctionProps extends software.amazon.jsii.JsiiSerializable, TargetBaseProps
Example:
import software.amazon.awscdk.services.lambda.*;
Function fn = Function.Builder.create(this, "MyFunc")
.runtime(Runtime.NODEJS_14_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()
The event to send to the Lambda.
|
getDeadLetterQueue, getMaxEventAge, getRetryAttempts@Stability(value=Stable) @Nullable default RuleTargetInput getEvent()
This will be the payload sent to the Lambda Function.
Default: the entire EventBridge event
@Stability(value=Stable) static LambdaFunctionProps.Builder builder()
builder in interface TargetBasePropsLambdaFunctionProps.Builder of LambdaFunctionPropsCopyright © 2022. All rights reserved.