OnSuccessProperty Struct
A destination for events that were processed successfully.
To retain records of successful asynchronous invocations , you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function, or Amazon EventBridge event bus as the destination.
OnSuccessis not supported inCreateEventSourceMappingorUpdateEventSourceMappingrequests.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const onSuccessProperty: lambda.CfnEventInvokeConfig.OnSuccessProperty = {
destination: 'destination',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_
on_success_property = lambda.CfnEventInvokeConfig.OnSuccessProperty(
destination="destination"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;
OnSuccessProperty onSuccessProperty = OnSuccessProperty.builder()
.destination("destination")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;
var onSuccessProperty = new OnSuccessProperty {
Destination = "destination"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
onSuccessProperty := &OnSuccessProperty{
Destination: jsii.String("destination"),
}
Properties
The Amazon Resource Name (ARN) of the destination resource.
notes
Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending
OnFailureevent to the destination. For details on this behavior, refer to Retaining records of asynchronous invocations .