Somehow I cannot figure out how to use the
DependsOn-Property correctly. I want to deploy a lambda function and also add a metric on the logs in one deploy. This fails because the logs are not created yet when serverless would like to create the Metric. I found out that there is a property for my serverless.yml called
DependsOnbut this throws the following error.
The CloudFormation template is invalid: Template format error: Unresolved resource dependencies [myFunction] in the Resources block of the template
I also tried
- Ref: myFunction
but this throws:
The CloudFormation template is invalid: Template format error: Every DependsOn value must be a string.
these are the section from my serverless.yml
Any tips, tricks and pointers into the right direction would be highly appreciated.