I’m trying to create an SNS topic in my serverless.yml Resources then reference it in my Lambda’s “onError” to use it as a DeadLetterQueue. I can create the topic and reference it in the iamRoleStatements fine. But when I try to use a CloudFormation “Ref” in the Lambda onError, I get a complaint “onError config must be provided as a string”.
That comes from the SLS code: https://github.com/serverless/serverless/pull/3609/files
Is this due to restrictions in CloudFormation itself, so there’s no way SLS can implement it?The AWS docs imply only a string is possible, not a Ref:
Am I understanding this limitation correctly?
gmetzker created a plugin and I’m guessing it’s to get-around this limitation, is that correct?
My most minimal example code:
- Effect: Allow
- Endpoint: firstname.lastname@example.org
# Ref: DeadLetterQueue # doesn't work: "onError config must be provided as a string"