agutoli / serverless-layers

Serverless.js plugin implementing AWS Lambda Layers, reducing lambda size, warm-up, and deployment time.
MIT License
229 stars 54 forks source link

How to specify name of layer #110

Closed sachinguptahsc closed 1 year ago

sachinguptahsc commented 2 years ago

Hello,

This is more of a question. I am not able to find a way to define name of layer. If we can define name of layer then, it will be easy to use it in different environment.

agutoli commented 1 year ago

Hi @sachinguptahsc, currently, it doesn't allow specifying the whole layer name. Its probably a good idea. But you can change the suffix name like:

<stack-name>-<stage>-<runtime>-<suffix>

custom:
  serverless-layers:
    - the-layer-suffix-name:
      ...options
    - the-other-layer-suffix-name:
        ...options
harishreddy-m commented 1 year ago

<stack-name>Dash<stage>Dash<runtime>Dash

This itself is taking up lot of string length and hitting max chars allowed.

Is it possible to declare a custom name for layer?