I am attempting to a set up a lambda with an event source of a specific kinesis stream. The relevant section of my serverless.yml reads:
functions:
dispatch-message:
handler: bin/main
events:
- stream:
arn: "arn:aws:kinesis:${opt:region, self:provider.region}:*:stream/${self:custom.ingestStream}"
batchSize: 100
startingPosition: LATEST
enabled: true
When deployed, however, the stack operation fails with the error:
An error occurred: DispatchDashmessageEventSourceMappingKinesisMessageingeststream - 1 validation error detected: Value 'arn:aws:kinesis:us-east-2::stream/message-ingest-stream’ at ‘eventSourceArn’ failed to satisfy constraint: Member must satisfy regular expression pattern: arn:(aws[a-zA-Z0-9-]):([a-zA-Z0-9-])+:([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]±\d{1})?:(\d{12})?:(.*) (Service: AWSLambda; Status Code: 400; Error Code: ValidationException; Request ID: dabd0940-7646-11e8-ab0a-010e891e2d26).
This pattern of course works for other ARN specifications, for example specifying iam role statements resources. Is there a right way to specify the event source ARN without including the AccountId?.