When configuring a mapping for a DynamoDB Stream, the lambda generates the following error:
Invalid configuration for target 'target1' of type 'kinesis', 'sourceArn' property must be a valid ARN of an Amazon Kinesis Stream or Amazon DynamoDB Stream. Ignoring target
I think that the problem is related to an erroneous regex in configuration.js file. Current value of regex is:
var sourceRegex = /^arn:aws:((kinesis:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:stream\/([a-zA-Z0-9-]{1,128}))|(kinesis:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:table\/[A-Za-z0-9.-]\/stream\/[0-9A-Z.:-]+))$/;_
I've replaced it with the following regex and it has worked:
var sourceRegex = /^arn:aws:((kinesis:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:stream\/([a-zA-Z0-9-]{1,128}))|(dynamodb:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:table\/[A-Za-z0-9.-]+\/stream\/[0-9A-Z.:-]+))$/;_
Hi,
When configuring a mapping for a DynamoDB Stream, the lambda generates the following error:
Invalid configuration for target 'target1' of type 'kinesis', 'sourceArn' property must be a valid ARN of an Amazon Kinesis Stream or Amazon DynamoDB Stream. Ignoring target
I think that the problem is related to an erroneous regex in configuration.js file. Current value of regex is:
var sourceRegex = /^arn:aws:((kinesis:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:stream\/([a-zA-Z0-9-]{1,128}))|(kinesis:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:table\/[A-Za-z0-9.-]\/stream\/[0-9A-Z.:-]+))$/;_
I've replaced it with the following regex and it has worked:
var sourceRegex = /^arn:aws:((kinesis:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:stream\/([a-zA-Z0-9-]{1,128}))|(dynamodb:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:table\/[A-Za-z0-9.-]+\/stream\/[0-9A-Z.:-]+))$/;_
KR,
Juan Carlos González