You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using lift 1.17.0 and serverless 3.17.0.
I used the single table construct to deploy a dynamodb table and I am now trying to trigger a lambda function with the dynamodb stream of the table.
Digging around a little bit with your exemple serverless.yml, I've found out that at the time of Serverless Framework validation, the service definition input - or at least solely the myFunc.events[0].stream - passed into ajv validator has the following value { type: 'dynamodb', arn: '${Token[TOKEN.194]}' }
This indeed does not validate against the framework JSON Schema definition as it's neither a CloudFormation intrinsic function, neither a string starting with arn:. The ${Token...} string is a CDK placeholder, that will be resolved at later stage.
One of those stage is the variable resolver called on ${construct:...} occurrences in the service file definition. However, the current observation would led to believe variable resolution actually happens after service file validation, which I find really strange. It is also strange that similar issues were not submitted on Lift earlier to emphasize this problem, I'm guessing the arn property from stream event type has a much stronger typing than other places where ${construct:...} variable resolver is usually used.
This might be worth asking around on https://github.com/serverless/serverless side to check if we can have their input on this issue. Would you care opening a linked issue on their side referencing this one ?
In the meantime, I implemented a small PR showcasing this issue in Lift unit tests suite.
Description
Hello !
I am using lift 1.17.0 and serverless 3.17.0.
I used the single table construct to deploy a dynamodb table and I am now trying to trigger a lambda function with the dynamodb stream of the table.
The event key for my function :
In my serverless configuration, I have
configValidationMode: 'error',
I have the following error when deploying :
Error: Configuration error at 'functions.dispatchEvents.events.0.stream': unsupported string format
It works well when I use
configValidationMode: 'warn'
, the lambda and the trigger are well deployed and workingHow to Reproduce
Additional Information
No response
The text was updated successfully, but these errors were encountered: