I’ve got a custom resource that will trigger one of my serverless functions. This resource uses DependsOn to wait for the AWS::Lambda::Function to be created, but I can’t figure out how to depend on the version resource — which appears necessary to avoid a race condition. (CF is calling my function before there’s a version available, and gives up by the time it is…)
How can I access the sha256 / name of the AWS::Lambda::Version that serverless manages internally so I can depend on it correctly?
so I’ve got:
functions:
foobar:
handler: foobar.handler
resources:
custom:
Type: Custom::FoobarTrigger
DependsOn: FoobarLambdaFunction
but I want to write:
DependsOn: FoobarLambdaVersion{sha256}
Help!
Thanks,
–Bob