We’re trying to migrate from the v2 variable resolvers to the new v3 variable resolver engine. I’m struggling with how to return undefined
values (i.e. my resolver can’t resolve).
If I return { value: undefined }
, serverless gives error:
Source "xyz" returned not supported result: "undefined"
If I return just undefined (i.e. not wrapped in { value }), serverless gives error:
Unexpected "xyz" source result: undefined
If I return { value: null }
, serverless gives error:
Value not found at "xyz" source
For context, I want to use this to pass an optional parameter:
MyLayer:
Type: AWS::Lambda::LayerVersion
Properties:
Content:
S3Bucket: ${myresolver:bucket, ''}
S3Key: ${myresolver:key, ''}
S3ObjectVersion: ${myresolver:objectVersion}
Any advice?