# OnSuccessProperty

A destination for events that were processed successfully.

To retain records of successful [asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations) , you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function, or Amazon EventBridge event bus as the destination.

> `OnSuccess` is not supported in `CreateEventSourceMapping` or `UpdateEventSourceMapping` requests.

- Source: Generated code
- Type last changed: v2.93.0 · 23 Aug 2023

## 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',
};
```

## Properties

- `destination`: string (required) — The Amazon Resource Name (ARN) of the destination resource.

  > 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 `OnFailure` event to the destination. For details on this behavior, refer to [Retaining records of asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html) .
