AWS Fundamentals Logo
AWS Fundamentals
AWS::Lambda::EventSourceMapping

Lambda EventSourceMapping

The AWS::Lambda::EventSourceMapping resource creates a mapping between an event source and an LAMlong function. LAM 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...

Properties

28 configurable properties. 1 required. Click a row to see details.

Filter:
PropertyTypeFlags
FunctionName
string
Required
AmazonManagedKafkaEventSourceConfig
AmazonManagedKafkaEventSourceConfig
BatchSize
integer
BisectBatchOnFunctionError
boolean
DestinationConfig
DestinationConfig
DocumentDBEventSourceConfig
DocumentDBEventSourceConfig
Enabled
boolean
EventSourceArn
string
Create-only
FilterCriteria
FilterCriteria
FunctionResponseTypes
Array<string>
KmsKeyArn
string
LoggingConfig
LoggingConfig
MaximumBatchingWindowInSeconds
integer
MaximumRecordAgeInSeconds
integer
MaximumRetryAttempts
integer
MetricsConfig
MetricsConfig
ParallelizationFactor
integer
ProvisionedPollerConfig
ProvisionedPollerConfig
Queues
Array<string>
ScalingConfig
ScalingConfig
SelfManagedEventSource
SelfManagedEventSource
Create-only
SelfManagedKafkaEventSourceConfig
SelfManagedKafkaEventSourceConfig
SourceAccessConfigurations
Array<SourceAccessConfiguration>
StartingPosition
string
Create-only
StartingPositionTimestamp
number
Create-only
Tags
Array<Tag>
Topics
Array<string>
TumblingWindowInSeconds
integer

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
EventSourceMappingArnstring-
Idstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::Lambda::EventSourceMapping

Resources:
  MyResource:
    Type: AWS::Lambda::EventSourceMapping
    Properties:
      FunctionName: "my-functionname"
      Tags:
        - Key: Environment
          Value: Production

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

lambda:CreateEventSourceMappinglambda:GetEventSourceMappinglambda:TagResourcekms:DescribeKeykms:GenerateDataKeykms:Decrypt

delete

lambda:DeleteEventSourceMappinglambda:GetEventSourceMappingkms:Decrypt

list

lambda:ListEventSourceMappings

read

lambda:GetEventSourceMappinglambda:ListTagskms:Decrypt

update

lambda:UpdateEventSourceMappinglambda:GetEventSourceMappinglambda:TagResourcelambda:UntagResourcekms:DescribeKeykms:GenerateDataKeykms:Decrypt

Get the Lambda Cheat Sheet

Everything you need to know about Lambda on one page. HD quality, print-friendly.

Download Free Infographic

Quick Facts

ServiceLambda
Properties30
Required1
TaggingSupported
Primary IDId

Supported Operations

CreateDeleteListReadUpdate

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

EventSourceArnStartingPositionStartingPositionTimestampSelfManagedEventSource

External Links