Adding packages to an existing layer in AWS lambda

Viewed 319

I have a layer in my work AWS account which contains many python libraries like pandas, numpy, sqlalchemy, etc. It has a folder structure of

-> LayerName:
     ->  python
          ->  pandas
          ->  numpy
              ......

I want to add my custom package also to this layer. How do I do that?

1 Answers

To add new packages to your Lambda layer, you would need to deploy a new version of the Layer containing the original packages as well as the new packages you wanted to add.

You can get the contents of a layer version by running get-layer-version and copying the contents from the Content.Location value.

Alternatively you would create a new Lambda layer and package these other packages into that.

Related