title: Lambda: Value of property Layers must be of type List of String
body: <p>I'm getting started trying to write a lambda function with node and puppeteer. I'm using the serverless framework</p>
  
  <p>I've been trying to follow <a href="https://codissimo.sinumo.tech/2019/12/27/serverless-puppeteer-with-aws-lambda-layers-and-node-js/" rel="nofollow noreferrer">https://codissimo.sinumo.tech/2019/12/27/serverless-puppeteer-with-aws-lambda-layers-and-node-js/</a> to utilize the provisioned chrome at <a href="https://github.com/shelfio/chrome-aws-lambda-layer" rel="nofollow noreferrer">https://github.com/shelfio/chrome-aws-lambda-layer</a> . My function is working as expected locally.</p>
  
  <p>My Yaml file contains:</p>
  
  <pre><code>provider:
    name: aws
    runtime: nodejs12.x
    region: us-east-1
    # here we put the layers we want to use
    layers:
      # Google Chrome for AWS Lambda as a layer
      # Make sure you use the latest version depending on the region
      # https://github.com/shelfio/chrome-aws-lambda-layer
      - arn:us-east-1: arn:aws:lambda:us-east-1:764866452798:layer:chrome-aws-lambda:10
  </code></pre>
  
  <p>When I run:</p>
  
  <pre><code>$ serverless deploy
  Serverless: Packaging service...
  Serverless: Excluding development dependencies...
  Serverless: Installing dependencies for custom CloudFormation resources...
  Serverless: Safeguards Processing...
  Serverless: Safeguards Results:
  
  Summary --------------------------------------------------
  
  passed - no-secret-env-vars
  passed - allowed-regions
  passed - framework-version
  warned - require-cfn-role
  passed - no-unsafe-wildcard-iam-permissions
  passed - allowed-stages
  passed - allowed-runtimes
  
  Details --------------------------------------------------
  
  1) Warned - no cfnRole set
      details: http://slss.io/sg-require-cfn-role
      Require the cfnRole option, which specifies a particular role for CloudFormation to assume while deploying.
  
  
  Serverless: Safeguards Summary: 6 passed, 1 warnings, 0 errors
  Serverless: Uploading CloudFormation file to S3...
  Serverless: Uploading artifacts...
  Serverless: Uploading service thelandnow.zip file to S3 (43.66 MB)...
  Serverless: Uploading custom CloudFormation resources...
  Serverless: Validating template...
  Serverless: Updating Stack...
  Serverless: Checking Stack update progress...
  .......
  Serverless: Operation failed!
  Serverless: View the full error output: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stack/detail?stackId=arn%3Aaws%3Acloudformation%3Aus-east-1%3A155754363046%3Astack%2Fsellthelandnow-dev%2F943f00e0-9d21-11ea-a8a3-12498e67507f
  Serverless: Publishing service to the Serverless Dashboard...
  Serverless: Successfully published your service to the Serverless Dashboard: https://dashboard.serverless.com/tenants/myaccount/applications/seller/services/thelandnow/stage/dev/region/us-east-1
  
  Serverless Error ---------------------------------------
  
  An error occurred: MainLambdaFunction - Value of property Layers must be of type List of String.
  
  Get Support --------------------------------------------
      Docs:          docs.serverless.com
      Bugs:          github.com/serverless/serverless/issues
      Issues:        forum.serverless.com
  
  Your Environment Information ---------------------------
      Operating System:          win32
      Node Version:              11.5.0
      Framework Version:         1.70.1
      Plugin Version:            3.6.11
      SDK Version:               2.3.0
      Components Version:        2.30.10
  </code></pre>
  
  <p>How can I fix this?</p>
  
  <p>Edit: </p>
  
  <p>Now getting:  </p>
  
  <p>So I guess in future I'll use a tool like <a href="https://www.convertjson.com/yaml-to-json.htm" rel="nofollow noreferrer">https://www.convertjson.com/yaml-to-json.htm</a>. Thank you. I changed to :</p>
  
  <pre><code>layers:
    - arn:us-east-1:arn:aws:lambda:us-east-1:764866452798:layer:chrome-aws-lambda:10
  </code></pre>
  
  <p>Now I'm seeing:</p>
  
  <pre><code> An error occurred: MainLambdaFunction - 1 validation error detected: Value '[arn:us-east-1:arn:aws:lambda:us-east-1:764866452798:layer:chrome-aws-lambda:10]' 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-_]+)] (Service: AWSLambdaInternal; Status Code: 400; Error Code: ValidationException; Request ID: a5fae73b-67b5-4910-8020-c283673e55f2).
  </code></pre>
  
  <p>Any ideas?</p>