

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Lambda::EventSourceMapping
<a name="aws-resource-lambda-eventsourcemapping"></a>

The `AWS::Lambda::EventSourceMapping` resource creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.

For details about each event source type, see the following topics. In particular, each of the topics describes the required and optional parameters for the specific event source. 
+  [ Configuring a Dynamo DB stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping) 
+  [ Configuring a Kinesis stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping) 
+  [ Configuring an SQS queue as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource) 
+  [ Configuring an MQ broker as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping) 
+  [ Configuring MSK as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html) 
+  [ Configuring Self-Managed Apache Kafka as an event source](https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html) 
+  [ Configuring Amazon DocumentDB as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html) 

## Syntax
<a name="aws-resource-lambda-eventsourcemapping-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-lambda-eventsourcemapping-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::EventSourceMapping",
  "Properties" : {
      "[AmazonManagedKafkaEventSourceConfig](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig)" : AmazonManagedKafkaEventSourceConfig,
      "[BatchSize](#cfn-lambda-eventsourcemapping-batchsize)" : Integer,
      "[BisectBatchOnFunctionError](#cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror)" : Boolean,
      "[DestinationConfig](#cfn-lambda-eventsourcemapping-destinationconfig)" : DestinationConfig,
      "[DocumentDBEventSourceConfig](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig)" : DocumentDBEventSourceConfig,
      "[Enabled](#cfn-lambda-eventsourcemapping-enabled)" : Boolean,
      "[EventSourceArn](#cfn-lambda-eventsourcemapping-eventsourcearn)" : String,
      "[FilterCriteria](#cfn-lambda-eventsourcemapping-filtercriteria)" : FilterCriteria,
      "[FunctionName](#cfn-lambda-eventsourcemapping-functionname)" : String,
      "[FunctionResponseTypes](#cfn-lambda-eventsourcemapping-functionresponsetypes)" : [ String, ... ],
      "[KmsKeyArn](#cfn-lambda-eventsourcemapping-kmskeyarn)" : String,
      "[LoggingConfig](#cfn-lambda-eventsourcemapping-loggingconfig)" : LoggingConfig,
      "[MaximumBatchingWindowInSeconds](#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds)" : Integer,
      "[MaximumRecordAgeInSeconds](#cfn-lambda-eventsourcemapping-maximumrecordageinseconds)" : Integer,
      "[MaximumRetryAttempts](#cfn-lambda-eventsourcemapping-maximumretryattempts)" : Integer,
      "[MetricsConfig](#cfn-lambda-eventsourcemapping-metricsconfig)" : MetricsConfig,
      "[ParallelizationFactor](#cfn-lambda-eventsourcemapping-parallelizationfactor)" : Integer,
      "[ProvisionedPollerConfig](#cfn-lambda-eventsourcemapping-provisionedpollerconfig)" : ProvisionedPollerConfig,
      "[Queues](#cfn-lambda-eventsourcemapping-queues)" : [ String, ... ],
      "[ScalingConfig](#cfn-lambda-eventsourcemapping-scalingconfig)" : ScalingConfig,
      "[SelfManagedEventSource](#cfn-lambda-eventsourcemapping-selfmanagedeventsource)" : SelfManagedEventSource,
      "[SelfManagedKafkaEventSourceConfig](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig)" : SelfManagedKafkaEventSourceConfig,
      "[SourceAccessConfigurations](#cfn-lambda-eventsourcemapping-sourceaccessconfigurations)" : [ SourceAccessConfiguration, ... ],
      "[StartingPosition](#cfn-lambda-eventsourcemapping-startingposition)" : String,
      "[StartingPositionTimestamp](#cfn-lambda-eventsourcemapping-startingpositiontimestamp)" : Number,
      "[Tags](#cfn-lambda-eventsourcemapping-tags)" : [ Tag, ... ],
      "[Topics](#cfn-lambda-eventsourcemapping-topics)" : [ String, ... ],
      "[TumblingWindowInSeconds](#cfn-lambda-eventsourcemapping-tumblingwindowinseconds)" : Integer
    }
}
```

### YAML
<a name="aws-resource-lambda-eventsourcemapping-syntax.yaml"></a>

```
Type: AWS::Lambda::EventSourceMapping
Properties:
  [AmazonManagedKafkaEventSourceConfig](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig): 
    AmazonManagedKafkaEventSourceConfig
  [BatchSize](#cfn-lambda-eventsourcemapping-batchsize): Integer
  [BisectBatchOnFunctionError](#cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror): Boolean
  [DestinationConfig](#cfn-lambda-eventsourcemapping-destinationconfig): 
    DestinationConfig
  [DocumentDBEventSourceConfig](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig): 
    DocumentDBEventSourceConfig
  [Enabled](#cfn-lambda-eventsourcemapping-enabled): Boolean
  [EventSourceArn](#cfn-lambda-eventsourcemapping-eventsourcearn): String
  [FilterCriteria](#cfn-lambda-eventsourcemapping-filtercriteria): 
    FilterCriteria
  [FunctionName](#cfn-lambda-eventsourcemapping-functionname): String
  [FunctionResponseTypes](#cfn-lambda-eventsourcemapping-functionresponsetypes): 
    - String
  [KmsKeyArn](#cfn-lambda-eventsourcemapping-kmskeyarn): String
  [LoggingConfig](#cfn-lambda-eventsourcemapping-loggingconfig): 
    LoggingConfig
  [MaximumBatchingWindowInSeconds](#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds): Integer
  [MaximumRecordAgeInSeconds](#cfn-lambda-eventsourcemapping-maximumrecordageinseconds): Integer
  [MaximumRetryAttempts](#cfn-lambda-eventsourcemapping-maximumretryattempts): Integer
  [MetricsConfig](#cfn-lambda-eventsourcemapping-metricsconfig): 
    MetricsConfig
  [ParallelizationFactor](#cfn-lambda-eventsourcemapping-parallelizationfactor): Integer
  [ProvisionedPollerConfig](#cfn-lambda-eventsourcemapping-provisionedpollerconfig): 
    ProvisionedPollerConfig
  [Queues](#cfn-lambda-eventsourcemapping-queues): 
    - String
  [ScalingConfig](#cfn-lambda-eventsourcemapping-scalingconfig): 
    ScalingConfig
  [SelfManagedEventSource](#cfn-lambda-eventsourcemapping-selfmanagedeventsource): 
    SelfManagedEventSource
  [SelfManagedKafkaEventSourceConfig](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig): 
    SelfManagedKafkaEventSourceConfig
  [SourceAccessConfigurations](#cfn-lambda-eventsourcemapping-sourceaccessconfigurations): 
    - SourceAccessConfiguration
  [StartingPosition](#cfn-lambda-eventsourcemapping-startingposition): String
  [StartingPositionTimestamp](#cfn-lambda-eventsourcemapping-startingpositiontimestamp): Number
  [Tags](#cfn-lambda-eventsourcemapping-tags): 
    - Tag
  [Topics](#cfn-lambda-eventsourcemapping-topics): 
    - String
  [TumblingWindowInSeconds](#cfn-lambda-eventsourcemapping-tumblingwindowinseconds): Integer
```

## Properties
<a name="aws-resource-lambda-eventsourcemapping-properties"></a>

`AmazonManagedKafkaEventSourceConfig`  <a name="cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig"></a>
Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.  
*Required*: No  
*Type*: [AmazonManagedKafkaEventSourceConfig](aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BatchSize`  <a name="cfn-lambda-eventsourcemapping-batchsize"></a>
The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).  
+ **Amazon Kinesis** – Default 100. Max 10,000.
+ **Amazon DynamoDB Streams** – Default 100. Max 10,000.
+ **Amazon Simple Queue Service** – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
+ **Amazon Managed Streaming for Apache Kafka** – Default 100. Max 10,000.
+ **Self-managed Apache Kafka** – Default 100. Max 10,000.
+ **Amazon MQ (ActiveMQ and RabbitMQ)** – Default 100. Max 10,000.
+ **DocumentDB** – Default 100. Max 10,000.
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BisectBatchOnFunctionError`  <a name="cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror"></a>
(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.  
When using `BisectBatchOnFunctionError`, check the `BatchSize` parameter in the `OnFailure` destination message's metadata. The `BatchSize` could be greater than 1 since Lambda consolidates failed messages metadata when writing to the `OnFailure` destination.
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DestinationConfig`  <a name="cfn-lambda-eventsourcemapping-destinationconfig"></a>
(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.  
*Required*: No  
*Type*: [DestinationConfig](aws-properties-lambda-eventsourcemapping-destinationconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DocumentDBEventSourceConfig`  <a name="cfn-lambda-eventsourcemapping-documentdbeventsourceconfig"></a>
Specific configuration settings for a DocumentDB event source.  
*Required*: No  
*Type*: [DocumentDBEventSourceConfig](aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Enabled`  <a name="cfn-lambda-eventsourcemapping-enabled"></a>
When true, the event source mapping is active. When false, Lambda pauses polling and invocation.  
Default: True  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EventSourceArn`  <a name="cfn-lambda-eventsourcemapping-eventsourcearn"></a>
The Amazon Resource Name (ARN) of the event source.  
+ **Amazon Kinesis** – The ARN of the data stream or a stream consumer.
+ **Amazon DynamoDB Streams** – The ARN of the stream.
+ **Amazon Simple Queue Service** – The ARN of the queue.
+ **Amazon Managed Streaming for Apache Kafka** – The ARN of the cluster or the ARN of the VPC connection (for [cross-account event source mappings](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc)).
+ **Amazon MQ** – The ARN of the broker.
+ **Amazon DocumentDB** – The ARN of the DocumentDB change stream.
*Required*: No  
*Type*: String  
*Pattern*: `arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:(.*)`  
*Minimum*: `12`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FilterCriteria`  <a name="cfn-lambda-eventsourcemapping-filtercriteria"></a>
An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html).  
*Required*: No  
*Type*: [FilterCriteria](aws-properties-lambda-eventsourcemapping-filtercriteria.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FunctionName`  <a name="cfn-lambda-eventsourcemapping-functionname"></a>
The name or ARN of the Lambda function.  

**Name formats**
+ **Function name** – `MyFunction`.
+ **Function ARN** – `arn:aws:lambda:us-west-2:123456789012:function:MyFunction`.
+ **Version or Alias ARN** – `arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD`.
+ **Partial ARN** – `123456789012:function:MyFunction`.
The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.  
*Required*: Yes  
*Type*: String  
*Pattern*: `(arn:(aws[a-zA-Z-]*)?:lambda:)?((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST(\.PUBLISHED)?|[a-zA-Z0-9-_]+))?`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FunctionResponseTypes`  <a name="cfn-lambda-eventsourcemapping-functionresponsetypes"></a>
(Kinesis, DynamoDB Streams, and SQS) A list of current response type enums applied to the event source mapping.  
Valid Values: `ReportBatchItemFailures`  
*Required*: No  
*Type*: Array of String  
*Allowed values*: `ReportBatchItemFailures`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKeyArn`  <a name="cfn-lambda-eventsourcemapping-kmskeyarn"></a>
 The ARN of the AWS Key Management Service (AWS KMS) customer managed key that Lambda uses to encrypt your function's [filter criteria](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics).  
*Required*: No  
*Type*: String  
*Pattern*: `(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()`  
*Minimum*: `12`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LoggingConfig`  <a name="cfn-lambda-eventsourcemapping-loggingconfig"></a>
(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. For more information, see [Event source mapping logging](https://docs.aws.amazon.com/lambda/latest/dg/esm-logging.html).  
*Required*: No  
*Type*: [LoggingConfig](aws-properties-lambda-eventsourcemapping-loggingconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaximumBatchingWindowInSeconds`  <a name="cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds"></a>
The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.  
**Default (Kinesis, DynamoDB, Amazon SQS event sources)**: 0  
**Default (Amazon MSK, Kafka, Amazon MQ, Amazon DocumentDB event sources)**: 500 ms  
**Related setting: ** For Amazon SQS event sources, when you set `BatchSize` to a value greater than 10, you must set `MaximumBatchingWindowInSeconds` to at least 1.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `300`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaximumRecordAgeInSeconds`  <a name="cfn-lambda-eventsourcemapping-maximumrecordageinseconds"></a>
(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.  
The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed
*Required*: No  
*Type*: Integer  
*Minimum*: `-1`  
*Maximum*: `604800`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaximumRetryAttempts`  <a name="cfn-lambda-eventsourcemapping-maximumretryattempts"></a>
(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.  
*Required*: No  
*Type*: Integer  
*Minimum*: `-1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricsConfig`  <a name="cfn-lambda-eventsourcemapping-metricsconfig"></a>
The metrics configuration for your event source. For more information, see [Event source mapping metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics).  
*Required*: No  
*Type*: [MetricsConfig](aws-properties-lambda-eventsourcemapping-metricsconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ParallelizationFactor`  <a name="cfn-lambda-eventsourcemapping-parallelizationfactor"></a>
(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProvisionedPollerConfig`  <a name="cfn-lambda-eventsourcemapping-provisionedpollerconfig"></a>
(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see [provisioned mode](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode).  
*Required*: No  
*Type*: [ProvisionedPollerConfig](aws-properties-lambda-eventsourcemapping-provisionedpollerconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Queues`  <a name="cfn-lambda-eventsourcemapping-queues"></a>
 (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `1000 | 1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScalingConfig`  <a name="cfn-lambda-eventsourcemapping-scalingconfig"></a>
This property is for Amazon SQS event sources only. You cannot use `ProvisionedPollerConfig` while using `ScalingConfig`. These options are mutually exclusive. To remove the scaling configuration, pass an empty value.  
*Required*: No  
*Type*: [ScalingConfig](aws-properties-lambda-eventsourcemapping-scalingconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SelfManagedEventSource`  <a name="cfn-lambda-eventsourcemapping-selfmanagedeventsource"></a>
The self-managed Apache Kafka cluster for your event source.  
*Required*: No  
*Type*: [SelfManagedEventSource](aws-properties-lambda-eventsourcemapping-selfmanagedeventsource.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SelfManagedKafkaEventSourceConfig`  <a name="cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig"></a>
Specific configuration settings for a self-managed Apache Kafka event source.  
*Required*: No  
*Type*: [SelfManagedKafkaEventSourceConfig](aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SourceAccessConfigurations`  <a name="cfn-lambda-eventsourcemapping-sourceaccessconfigurations"></a>
An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.  
*Required*: No  
*Type*: Array of [SourceAccessConfiguration](aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.md)  
*Minimum*: `1`  
*Maximum*: `22`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StartingPosition`  <a name="cfn-lambda-eventsourcemapping-startingposition"></a>
The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB.  
+ **LATEST** - Read only new records.
+ **TRIM\$1HORIZON** - Process all available records.
+ **AT\$1TIMESTAMP** - Specify a time from which to start reading records.
*Required*: No  
*Type*: String  
*Pattern*: `(LATEST|TRIM_HORIZON|AT_TIMESTAMP)+`  
*Minimum*: `6`  
*Maximum*: `12`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StartingPositionTimestamp`  <a name="cfn-lambda-eventsourcemapping-startingpositiontimestamp"></a>
With `StartingPosition` set to `AT_TIMESTAMP`, the time from which to start reading, in Unix time seconds. `StartingPositionTimestamp` cannot be in the future.  
*Required*: No  
*Type*: Number  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-lambda-eventsourcemapping-tags"></a>
A list of tags to add to the event source mapping.  
You must have the `lambda:TagResource`, `lambda:UntagResource`, and `lambda:ListTags` permissions for your [IAM principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html) to manage the CloudFormation stack. If you don't have these permissions, there might be unexpected behavior with stack-level tags propagating to the resource during resource creation and update.
*Required*: No  
*Type*: Array of [Tag](aws-properties-lambda-eventsourcemapping-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Topics`  <a name="cfn-lambda-eventsourcemapping-topics"></a>
The name of the Kafka topic.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `249 | 1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TumblingWindowInSeconds`  <a name="cfn-lambda-eventsourcemapping-tumblingwindowinseconds"></a>
(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `900`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-lambda-eventsourcemapping-return-values"></a>

### Ref
<a name="aws-resource-lambda-eventsourcemapping-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the mapping's ID.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-lambda-eventsourcemapping-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-lambda-eventsourcemapping-return-values-fn--getatt-fn--getatt"></a>

`EventSourceMappingArn`  <a name="EventSourceMappingArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the event source mapping.

`Id`  <a name="Id-fn::getatt"></a>
The event source mapping's ID.

## Examples
<a name="aws-resource-lambda-eventsourcemapping--examples"></a>



### Event Source Mapping
<a name="aws-resource-lambda-eventsourcemapping--examples--Event_Source_Mapping"></a>

Create an event source mapping that reads events from Amazon Kinesis and invokes a Lambda function in the same template.

#### JSON
<a name="aws-resource-lambda-eventsourcemapping--examples--Event_Source_Mapping--json"></a>

```
"EventSourceMapping": {
    "Type": "AWS::Lambda::EventSourceMapping",
    "Properties": {
        "EventSourceArn": {
            "Fn::Join": [
                "",
                [
                    "arn:aws:kinesis:",
                    {
                        "Ref": "AWS::Region"
                    },
                    ":",
                    {
                        "Ref": "AWS::AccountId"
                    },
                    ":stream/",
                    {
                        "Ref": "KinesisStream"
                    }
                ]
            ]
        },
        "FunctionName": {
            "Fn::GetAtt": [
                "LambdaFunction",
                "Arn"
            ]
        },
        "StartingPosition": "TRIM_HORIZON"
    }
}
```

#### YAML
<a name="aws-resource-lambda-eventsourcemapping--examples--Event_Source_Mapping--yaml"></a>

```
MyEventSourceMapping:
  Type: AWS::Lambda::EventSourceMapping
  Properties:
    EventSourceArn:
      Fn::Join:
        - ""
        -
          - "arn:aws:kinesis:"
          -
            Ref: "AWS::Region"
          - ":"
          -
            Ref: "AWS::AccountId"
          - ":stream/"
          -
            Ref: "KinesisStream"
    FunctionName:
      Fn::GetAtt:
        - "LambdaFunction"
        - "Arn"
    StartingPosition: "TRIM_HORIZON"
```

# AWS::Lambda::EventSourceMapping AmazonManagedKafkaEventSourceConfig
<a name="aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig"></a>

Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-syntax.json"></a>

```
{
  "[ConsumerGroupId](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-consumergroupid)" : String,
  "[SchemaRegistryConfig](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-schemaregistryconfig)" : SchemaRegistryConfig
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-syntax.yaml"></a>

```
  [ConsumerGroupId](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-consumergroupid): String
  [SchemaRegistryConfig](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-schemaregistryconfig): 
    SchemaRegistryConfig
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-properties"></a>

`ConsumerGroupId`  <a name="cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-consumergroupid"></a>
The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see [Customizable consumer group ID](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id).  
*Required*: No  
*Type*: String  
*Pattern*: `[a-zA-Z0-9-\/*:_+=.@-]*`  
*Minimum*: `1`  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SchemaRegistryConfig`  <a name="cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-schemaregistryconfig"></a>
Specific configuration settings for a Kafka schema registry.  
*Required*: No  
*Type*: [SchemaRegistryConfig](aws-properties-lambda-eventsourcemapping-schemaregistryconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping DestinationConfig
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig"></a>

A configuration object that specifies the destination of an event after Lambda processes it. For more information, see [Adding a destination](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig-syntax.json"></a>

```
{
  "[OnFailure](#cfn-lambda-eventsourcemapping-destinationconfig-onfailure)" : OnFailure
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig-syntax.yaml"></a>

```
  [OnFailure](#cfn-lambda-eventsourcemapping-destinationconfig-onfailure): 
    OnFailure
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig-properties"></a>

`OnFailure`  <a name="cfn-lambda-eventsourcemapping-destinationconfig-onfailure"></a>
The destination configuration for failed invocations.  
*Required*: No  
*Type*: [OnFailure](aws-properties-lambda-eventsourcemapping-onfailure.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig--examples"></a>



### On-Failure Destination Configuration
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig--examples--On-Failure_Destination_Configuration"></a>

Configure a function to send a record of failed batches to an SQS queue.

#### YAML
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig--examples--On-Failure_Destination_Configuration--yaml"></a>

```
      DestinationConfig:
          OnFailure:
            Destination: arn:aws:sqs:us-east-2:123456789012:dlq
```

# AWS::Lambda::EventSourceMapping DocumentDBEventSourceConfig
<a name="aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig"></a>

 Specific configuration settings for a DocumentDB event source. 

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig-syntax.json"></a>

```
{
  "[CollectionName](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-collectionname)" : String,
  "[DatabaseName](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-databasename)" : String,
  "[FullDocument](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-fulldocument)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig-syntax.yaml"></a>

```
  [CollectionName](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-collectionname): String
  [DatabaseName](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-databasename): String
  [FullDocument](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-fulldocument): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig-properties"></a>

`CollectionName`  <a name="cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-collectionname"></a>
 The name of the collection to consume within the database. If you do not specify a collection, Lambda consumes all collections.   
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `57`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DatabaseName`  <a name="cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-databasename"></a>
 The name of the database to consume within the DocumentDB cluster.   
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FullDocument`  <a name="cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-fulldocument"></a>
 Determines what DocumentDB sends to your event stream during document update operations. If set to UpdateLookup, DocumentDB sends a delta describing the changes, along with a copy of the entire document. Otherwise, DocumentDB sends only a partial document that contains the changes.   
*Required*: No  
*Type*: String  
*Allowed values*: `UpdateLookup | Default`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping Endpoints
<a name="aws-properties-lambda-eventsourcemapping-endpoints"></a>

The list of bootstrap servers for your Kafka brokers in the following format: `"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-endpoints-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-endpoints-syntax.json"></a>

```
{
  "[KafkaBootstrapServers](#cfn-lambda-eventsourcemapping-endpoints-kafkabootstrapservers)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-endpoints-syntax.yaml"></a>

```
  [KafkaBootstrapServers](#cfn-lambda-eventsourcemapping-endpoints-kafkabootstrapservers): 
    - String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-endpoints-properties"></a>

`KafkaBootstrapServers`  <a name="cfn-lambda-eventsourcemapping-endpoints-kafkabootstrapservers"></a>
The list of bootstrap servers for your Kafka brokers in the following format: `"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `300 | 10`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Lambda::EventSourceMapping Filter
<a name="aws-properties-lambda-eventsourcemapping-filter"></a>

 A structure within a `FilterCriteria` object that defines an event filtering pattern. 

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-filter-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-filter-syntax.json"></a>

```
{
  "[Pattern](#cfn-lambda-eventsourcemapping-filter-pattern)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-filter-syntax.yaml"></a>

```
  [Pattern](#cfn-lambda-eventsourcemapping-filter-pattern): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-filter-properties"></a>

`Pattern`  <a name="cfn-lambda-eventsourcemapping-filter-pattern"></a>
 A filter pattern. For more information on the syntax of a filter pattern, see [ Filter rule syntax](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax).   
*Required*: No  
*Type*: String  
*Pattern*: `.*`  
*Minimum*: `0`  
*Maximum*: `4096`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping FilterCriteria
<a name="aws-properties-lambda-eventsourcemapping-filtercriteria"></a>

 An object that contains the filters for an event source. 

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-filtercriteria-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-filtercriteria-syntax.json"></a>

```
{
  "[Filters](#cfn-lambda-eventsourcemapping-filtercriteria-filters)" : [ Filter, ... ]
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-filtercriteria-syntax.yaml"></a>

```
  [Filters](#cfn-lambda-eventsourcemapping-filtercriteria-filters): 
    - Filter
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-filtercriteria-properties"></a>

`Filters`  <a name="cfn-lambda-eventsourcemapping-filtercriteria-filters"></a>
 A list of filters.   
*Required*: No  
*Type*: Array of [Filter](aws-properties-lambda-eventsourcemapping-filter.md)  
*Minimum*: `1`  
*Maximum*: `20`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping LoggingConfig
<a name="aws-properties-lambda-eventsourcemapping-loggingconfig"></a>

The function's Amazon CloudWatch Logs configuration settings.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-loggingconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-loggingconfig-syntax.json"></a>

```
{
  "[SystemLogLevel](#cfn-lambda-eventsourcemapping-loggingconfig-systemloglevel)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-loggingconfig-syntax.yaml"></a>

```
  [SystemLogLevel](#cfn-lambda-eventsourcemapping-loggingconfig-systemloglevel): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-loggingconfig-properties"></a>

`SystemLogLevel`  <a name="cfn-lambda-eventsourcemapping-loggingconfig-systemloglevel"></a>
Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where `DEBUG` is the highest level and `WARN` is the lowest.  
*Required*: No  
*Type*: String  
*Allowed values*: `DEBUG | INFO | WARN`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping MetricsConfig
<a name="aws-properties-lambda-eventsourcemapping-metricsconfig"></a>

The metrics configuration for your event source. Use this configuration object to define which metrics you want your event source mapping to produce.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-metricsconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-metricsconfig-syntax.json"></a>

```
{
  "[Metrics](#cfn-lambda-eventsourcemapping-metricsconfig-metrics)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-metricsconfig-syntax.yaml"></a>

```
  [Metrics](#cfn-lambda-eventsourcemapping-metricsconfig-metrics): 
    - String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-metricsconfig-properties"></a>

`Metrics`  <a name="cfn-lambda-eventsourcemapping-metricsconfig-metrics"></a>
 The metrics you want your event source mapping to produce, including `EventCount`, `ErrorCount`, `KafkaMetrics`.   
+ `EventCount` to receive metrics related to the number of events processed by your event source mapping.
+ `ErrorCount` (Amazon MSK and self-managed Apache Kafka) to receive metrics related to the number of errors in your event source mapping processing.
+ `KafkaMetrics` (Amazon MSK and self-managed Apache Kafka) to receive metrics related to the Kafka consumers from your event source mapping.
 For more information about these metrics, see [ Event source mapping metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics).   
*Required*: No  
*Type*: Array of String  
*Allowed values*: `EventCount | ErrorCount | KafkaMetrics`  
*Minimum*: `0`  
*Maximum*: `3`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping OnFailure
<a name="aws-properties-lambda-eventsourcemapping-onfailure"></a>

A destination for events that failed processing. For more information, see [Adding a destination](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-onfailure-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-onfailure-syntax.json"></a>

```
{
  "[Destination](#cfn-lambda-eventsourcemapping-onfailure-destination)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-onfailure-syntax.yaml"></a>

```
  [Destination](#cfn-lambda-eventsourcemapping-onfailure-destination): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-onfailure-properties"></a>

`Destination`  <a name="cfn-lambda-eventsourcemapping-onfailure-destination"></a>
The Amazon Resource Name (ARN) of the destination resource.  
To retain records of failed invocations from [Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html), [DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html), [self-managed Apache Kafka](https://docs.aws.amazon.com/lambda/latest/dg/kafka-on-failure.html), or [Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/kafka-on-failure.html), you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, or Kafka topic as the destination.  
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).
To retain records of failed invocations from [Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html), [DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html), [self-managed Kafka](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination) or [Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination), you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.  
*Required*: No  
*Type*: String  
*Pattern*: `^$|kafka://([^.]([a-zA-Z0-9\-_.]{0,248}))|arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:(.*)`  
*Minimum*: `12`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-eventsourcemapping-onfailure--examples"></a>



### On-Failure Destination Configuration
<a name="aws-properties-lambda-eventsourcemapping-onfailure--examples--On-Failure_Destination_Configuration"></a>

Configure a function to send a record of failed batches to an SQS queue.

#### YAML
<a name="aws-properties-lambda-eventsourcemapping-onfailure--examples--On-Failure_Destination_Configuration--yaml"></a>

```
          OnFailure:
            Destination: arn:aws:sqs:us-east-2:123456789012:dlq
```

# AWS::Lambda::EventSourceMapping ProvisionedPollerConfig
<a name="aws-properties-lambda-eventsourcemapping-provisionedpollerconfig"></a>

The [ provisioned mode](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode) configuration for the event source. Use Provisioned Mode to customize the minimum and maximum number of event pollers for your event source.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-provisionedpollerconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-provisionedpollerconfig-syntax.json"></a>

```
{
  "[MaximumPollers](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-maximumpollers)" : Integer,
  "[MinimumPollers](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-minimumpollers)" : Integer,
  "[PollerGroupName](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-pollergroupname)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-provisionedpollerconfig-syntax.yaml"></a>

```
  [MaximumPollers](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-maximumpollers): Integer
  [MinimumPollers](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-minimumpollers): Integer
  [PollerGroupName](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-pollergroupname): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-provisionedpollerconfig-properties"></a>

`MaximumPollers`  <a name="cfn-lambda-eventsourcemapping-provisionedpollerconfig-maximumpollers"></a>
The maximum number of event pollers this event source can scale up to. For Amazon SQS events source mappings, default is 200, and minimum value allowed is 2. For Amazon MSK and self-managed Apache Kafka event source mappings, default is 200, and minimum value allowed is 1.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `2000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinimumPollers`  <a name="cfn-lambda-eventsourcemapping-provisionedpollerconfig-minimumpollers"></a>
The minimum number of event pollers this event source can scale down to. For Amazon SQS events source mappings, default is 2, and minimum 2 required. For Amazon MSK and self-managed Apache Kafka event source mappings, default is 1.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PollerGroupName`  <a name="cfn-lambda-eventsourcemapping-provisionedpollerconfig-pollergroupname"></a>
(Amazon MSK and self-managed Apache Kafka) The name of the provisioned poller group. Use this option to group multiple ESMs within the event source's VPC to share Event Poller Unit (EPU) capacity. You can use this option to optimize Provisioned mode costs for your ESMs. You can group up to 100 ESMs per poller group and aggregate maximum pollers across all ESMs in a group cannot exceed 2000.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping ScalingConfig
<a name="aws-properties-lambda-eventsourcemapping-scalingconfig"></a>

(Amazon SQS only) The scaling configuration for the event source. To remove the configuration, pass an empty value.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-scalingconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-scalingconfig-syntax.json"></a>

```
{
  "[MaximumConcurrency](#cfn-lambda-eventsourcemapping-scalingconfig-maximumconcurrency)" : Integer
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-scalingconfig-syntax.yaml"></a>

```
  [MaximumConcurrency](#cfn-lambda-eventsourcemapping-scalingconfig-maximumconcurrency): Integer
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-scalingconfig-properties"></a>

`MaximumConcurrency`  <a name="cfn-lambda-eventsourcemapping-scalingconfig-maximumconcurrency"></a>
Limits the number of concurrent instances that the Amazon SQS event source can invoke.  
*Required*: No  
*Type*: Integer  
*Minimum*: `2`  
*Maximum*: `1000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping SchemaRegistryAccessConfig
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig"></a>

Specific access configuration settings that tell Lambda how to authenticate with your schema registry.

If you're working with an AWS Glue schema registry, don't provide authentication details in this object. Instead, ensure that your execution role has the required permissions for Lambda to access your cluster.

If you're working with a Confluent schema registry, choose the authentication method in the `Type` field, and provide the AWS Secrets Manager secret ARN in the `URI` field.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig-syntax.json"></a>

```
{
  "[Type](#cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-type)" : String,
  "[URI](#cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-uri)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig-syntax.yaml"></a>

```
  [Type](#cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-type): String
  [URI](#cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-uri): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig-properties"></a>

`Type`  <a name="cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-type"></a>
 The type of authentication Lambda uses to access your schema registry.   
*Required*: No  
*Type*: String  
*Allowed values*: `BASIC_AUTH | CLIENT_CERTIFICATE_TLS_AUTH | SERVER_ROOT_CA_CERTIFICATE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`URI`  <a name="cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-uri"></a>
 The URI of the secret (Secrets Manager secret ARN) to authenticate with your schema registry.   
*Required*: No  
*Type*: String  
*Pattern*: `arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:(.*)`  
*Minimum*: `1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping SchemaRegistryConfig
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryconfig"></a>

Specific configuration settings for a Kafka schema registry.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryconfig-syntax.json"></a>

```
{
  "[AccessConfigs](#cfn-lambda-eventsourcemapping-schemaregistryconfig-accessconfigs)" : [ SchemaRegistryAccessConfig, ... ],
  "[EventRecordFormat](#cfn-lambda-eventsourcemapping-schemaregistryconfig-eventrecordformat)" : String,
  "[SchemaRegistryURI](#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemaregistryuri)" : String,
  "[SchemaValidationConfigs](#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemavalidationconfigs)" : [ SchemaValidationConfig, ... ]
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryconfig-syntax.yaml"></a>

```
  [AccessConfigs](#cfn-lambda-eventsourcemapping-schemaregistryconfig-accessconfigs): 
    - SchemaRegistryAccessConfig
  [EventRecordFormat](#cfn-lambda-eventsourcemapping-schemaregistryconfig-eventrecordformat): String
  [SchemaRegistryURI](#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemaregistryuri): String
  [SchemaValidationConfigs](#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemavalidationconfigs): 
    - SchemaValidationConfig
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryconfig-properties"></a>

`AccessConfigs`  <a name="cfn-lambda-eventsourcemapping-schemaregistryconfig-accessconfigs"></a>
An array of access configuration objects that tell Lambda how to authenticate with your schema registry.  
*Required*: No  
*Type*: Array of [SchemaRegistryAccessConfig](aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig.md)  
*Maximum*: `2`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EventRecordFormat`  <a name="cfn-lambda-eventsourcemapping-schemaregistryconfig-eventrecordformat"></a>
The record format that Lambda delivers to your function after schema validation.  
+ Choose `JSON` to have Lambda deliver the record to your function as a standard JSON object.
+ Choose `SOURCE` to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.
*Required*: No  
*Type*: String  
*Allowed values*: `JSON | SOURCE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SchemaRegistryURI`  <a name="cfn-lambda-eventsourcemapping-schemaregistryconfig-schemaregistryuri"></a>
The URI for your schema registry. The correct URI format depends on the type of schema registry you're using.  
+ For AWS Glue schema registries, use the ARN of the registry.
+ For Confluent schema registries, use the URL of the registry.
*Required*: No  
*Type*: String  
*Pattern*: `[a-zA-Z0-9-/*:_+=.@-]*`  
*Minimum*: `1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SchemaValidationConfigs`  <a name="cfn-lambda-eventsourcemapping-schemaregistryconfig-schemavalidationconfigs"></a>
An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.  
*Required*: No  
*Type*: Array of [SchemaValidationConfig](aws-properties-lambda-eventsourcemapping-schemavalidationconfig.md)  
*Minimum*: `1`  
*Maximum*: `2`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping SchemaValidationConfig
<a name="aws-properties-lambda-eventsourcemapping-schemavalidationconfig"></a>

Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-schemavalidationconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-schemavalidationconfig-syntax.json"></a>

```
{
  "[Attribute](#cfn-lambda-eventsourcemapping-schemavalidationconfig-attribute)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-schemavalidationconfig-syntax.yaml"></a>

```
  [Attribute](#cfn-lambda-eventsourcemapping-schemavalidationconfig-attribute): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-schemavalidationconfig-properties"></a>

`Attribute`  <a name="cfn-lambda-eventsourcemapping-schemavalidationconfig-attribute"></a>
 The attributes you want your schema registry to validate and filter for. If you selected `JSON` as the `EventRecordFormat`, Lambda also deserializes the selected message attributes.   
*Required*: No  
*Type*: String  
*Allowed values*: `KEY | VALUE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping SelfManagedEventSource
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedeventsource"></a>

The self-managed Apache Kafka cluster for your event source.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedeventsource-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedeventsource-syntax.json"></a>

```
{
  "[Endpoints](#cfn-lambda-eventsourcemapping-selfmanagedeventsource-endpoints)" : Endpoints
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedeventsource-syntax.yaml"></a>

```
  [Endpoints](#cfn-lambda-eventsourcemapping-selfmanagedeventsource-endpoints): 
    Endpoints
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedeventsource-properties"></a>

`Endpoints`  <a name="cfn-lambda-eventsourcemapping-selfmanagedeventsource-endpoints"></a>
The list of bootstrap servers for your Kafka brokers in the following format: `"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`.  
*Required*: No  
*Type*: [Endpoints](aws-properties-lambda-eventsourcemapping-endpoints.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Lambda::EventSourceMapping SelfManagedKafkaEventSourceConfig
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig"></a>

Specific configuration settings for a self-managed Apache Kafka event source.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-syntax.json"></a>

```
{
  "[ConsumerGroupId](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-consumergroupid)" : String,
  "[SchemaRegistryConfig](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-schemaregistryconfig)" : SchemaRegistryConfig
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-syntax.yaml"></a>

```
  [ConsumerGroupId](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-consumergroupid): String
  [SchemaRegistryConfig](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-schemaregistryconfig): 
    SchemaRegistryConfig
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-properties"></a>

`ConsumerGroupId`  <a name="cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-consumergroupid"></a>
 The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see [Customizable consumer group ID](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka-process.html#services-smaa-topic-add).  
*Required*: No  
*Type*: String  
*Pattern*: `[a-zA-Z0-9-\/*:_+=.@-]*`  
*Minimum*: `1`  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SchemaRegistryConfig`  <a name="cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-schemaregistryconfig"></a>
Specific configuration settings for a Kafka schema registry.  
*Required*: No  
*Type*: [SchemaRegistryConfig](aws-properties-lambda-eventsourcemapping-schemaregistryconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping SourceAccessConfiguration
<a name="aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration"></a>

An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration-syntax.json"></a>

```
{
  "[Type](#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type)" : String,
  "[URI](#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration-syntax.yaml"></a>

```
  [Type](#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type): String
  [URI](#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration-properties"></a>

`Type`  <a name="cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type"></a>
The type of authentication protocol, VPC components, or virtual host for your event source. For example: `"Type":"SASL_SCRAM_512_AUTH"`.  
+ `BASIC_AUTH` – (Amazon MQ) The AWS Secrets Manager secret that stores your broker credentials.
+ `BASIC_AUTH` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers.
+ `VPC_SUBNET` – (Self-managed Apache Kafka) The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster.
+ `VPC_SECURITY_GROUP` – (Self-managed Apache Kafka) The VPC security group used to manage access to your self-managed Apache Kafka brokers.
+ `SASL_SCRAM_256_AUTH` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers.
+ `SASL_SCRAM_512_AUTH` – (Amazon MSK, Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers.
+ `VIRTUAL_HOST` –- (RabbitMQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source. This property cannot be specified in an UpdateEventSourceMapping API call.
+ `CLIENT_CERTIFICATE_TLS_AUTH` – (Amazon MSK, self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS\$18 PEM), and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers.
+ `SERVER_ROOT_CA_CERTIFICATE` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers. 
*Required*: No  
*Type*: String  
*Allowed values*: `BASIC_AUTH | VPC_SUBNET | VPC_SECURITY_GROUP | SASL_SCRAM_512_AUTH | SASL_SCRAM_256_AUTH | VIRTUAL_HOST | CLIENT_CERTIFICATE_TLS_AUTH | SERVER_ROOT_CA_CERTIFICATE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`URI`  <a name="cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri"></a>
The value for your chosen configuration in `Type`. For example: `"URI": "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"`.  
*Required*: No  
*Type*: String  
*Pattern*: `[a-zA-Z0-9-\/*:_+=.@-]*`  
*Minimum*: `1`  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping Tag
<a name="aws-properties-lambda-eventsourcemapping-tag"></a>

A [tag](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to apply to the event source mapping.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lambda-eventsourcemapping-tag-syntax.json"></a>

```
{
  "[Key](#cfn-lambda-eventsourcemapping-tag-key)" : String,
  "[Value](#cfn-lambda-eventsourcemapping-tag-value)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-tag-syntax.yaml"></a>

```
  [Key](#cfn-lambda-eventsourcemapping-tag-key): String
  [Value](#cfn-lambda-eventsourcemapping-tag-value): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-tag-properties"></a>

`Key`  <a name="cfn-lambda-eventsourcemapping-tag-key"></a>
The key for this tag.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-lambda-eventsourcemapping-tag-value"></a>
The value for this tag.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)