Here's the sample CloudFormation syntax I am seeing in the AWS documentations for AWS::Lambda::EventSourceMapping
:
Type: "AWS::Lambda::EventSourceMapping"
Properties:
BatchSize: Integer
Enabled: Boolean
EventSourceArn: String
FunctionName: String
StartingPosition: String
Say I have a set of DDB Stream ARNs which I want to use as trigger of one lambda function (instead of one ARN as trigger). I tried to define this relationship like this:
Parameters:
DDBStreamARN:
Type: String
Default: arn:aws:dynamodb:us-west-2:someId1
AllowedValues:
- arn:aws:dynamodb:us-west-2:someId1
- arn:aws:dynamodb:us-west-2:someId2
- ...
Description: ARNs for the DDB Streams
Resources:
RegistrationRequestStreamMapping:
Type: AWS::Lambda::EventSourceMapping
Properties:
BatchSize: 70
EventSourceArn:
Ref: DDBStreamARN
FunctionName:
Fn::GetAtt:
- TestLambdaFunction
- Arn
StartingPosition: TRIM_HORIZON
Enabled: True
But the syntax doesn't seem to work since only the default value (arn:aws:dynamodb:us-west-2:someId1
) is working as trigger and the other ARNs wont trigger the lambda function. Any suggestion on how to fix this?