I want to add a custom variable but it is giving me a validation error. Here is an example of how I added it to my serverless.yml
functions:
health:
handler: health
events:
- http:
method: get
path: health
layers:
- ${self.custom.commonLib}
Error: validation error detected: Value ‘[${self.custom.commonLib}]’ at ‘layers’ failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 140, Member must have length greater than or equal to 1, Member must satisfy regular expression pattern: (arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-]+:[0-9]+)|(arn:[a-zA-Z0-9-]+:lambda:::awslayer:[a-zA-Z0-9-]+)]
Is this supported?