title: How to get latest Layer version with serverless framework for AWS Lambda
body: <p>I'm trying to get latest Layer version with serverless framework by using <code>serverless-latest-layer-version</code> plugin. That plugin itself can get latest version of Layer but problem is whenever I made new deployment for both layers and function, layer version is always showing previous one of new layer version. Below is serverless.yml that to get latest version and applied it into function. Help me to suggest anything I missed to configure to latest layer version?</p>
  
  <pre><code>layers:
      my-layers:
        path: my-layers
        name: ${opt:stage, 'development'}-my-layer
        description: Save all common npm dependencies in single project
        compatibleRuntimes:
          - nodejs10.x
  
    functions:
      app:
        handler: index.handler
        layers:
          - arn:aws:lambda:ap-southeast-1:#{AWS::AccountId}:layer:${opt:stage, 'development'}-my-layer:latest
  </code></pre>