Open marianina8 opened 5 years ago
Just a follow up, I was able to get it to work by changing my serverless.yml file's declaration of a stream from:
events:
- stream: ${env:arn}
to:
events:
- stream:
arn: ${env:arn}
type: dynamodb
(* arn is stored as an environment variable). For some reason I didn't see any documentation that suggests that this is how streams should be defined. To your knowledge is this the correct way to define a stream in serverless.yml? It seemed to work deploying to AWS Lambda even the original way. Thanks!
Just to chime in, I was facing a similar problem:
Type Error ---------------------------------------------
Cannot read property 'charAt' of undefined
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Your Environment Information -----------------------------
OS: darwin
Node Version: 10.11.0
Serverless Version: 1.36.3
My serverless.yml was:
events:
- stream:
arn: "arn:aws:kinesis:${region}:${account}:stream/${name}"
batchSize: 100
startingPosition: LATEST
enabled: true
Following @marianina8's method, I added the type
field:
events:
- stream:
arn: "arn:aws:kinesis:${region}:${account}:stream/${name}"
batchSize: 100
startingPosition: LATEST
enabled: true
type: kinesis
And that solved the problem.
ℹ️Might wanna add in the docs that the type
field is required.
When I run the following command:
serverless sam export --output ./sam-template.yml
I get the following error:
I'm using serverless v.1.30.3 and node v10.9 I'm not quite sure where to start with this error message as searching online has not yielded any similar issues/fixes. Any pointers would be greatly appreciated!