How to exclude directories using include/exclude

hello all…I’m using

service: test
    - ../src/
    - ../libs/**

method of defining my package. This is working, but that method is including /src and /libs folders themselves in the zip.

For a python lambda function on AWS, lambda is looking in the root of the unzipped file for your handler and libs. So I want just and all my lib directories (without the parent /libs or /src folders) to be in the root of my deployment zip. How can I achieve this with serverless and AWS lambda/python functions?
thanks, in advance!


I’m also struggling with this.

Did you try exclude all like below. And then include the necessary files.

    - ./**

did anyone solved this? i am also struggling with this. :roll_eyes:

11 Months and no-one has addressed this. :frowning: