python-lambda icon indicating copy to clipboard operation
python-lambda copied to clipboard

Bundling too many artifacts

Open opobla opened this issue 5 years ago • 4 comments

Hi! When doing lambda deploy too many artifacts get bundled:

Bundling: 'README.md'
Bundling: 'service.py'
Bundling: 'requirements.txt'
Bundling: 'event.json'
Bundling: '.gitignore'

Is there a way to exclude/include explicitly what should be bundled? Regards

opobla avatar Aug 20 '19 11:08 opobla

It does't answer your question completely, but if you need to include some source folder, you can add it in your config.yaml in build > source_directories separated by comma.

marcelorcorrea avatar Aug 21 '19 14:08 marcelorcorrea

I have tried to put the source code in a lib folder y include it in the config.yaml, but the result is that invoke no longer works and build bundles everything in the root folder and also the contents of the lib folder.

I think that the idea should be to add support for a sort of .lambdaignore mechanism to avoid bundling artifacts that do not belong to the execution environment of the lambda function.

opobla avatar Aug 22 '19 08:08 opobla

@opobla, indeed there are no possibility to this. According to the source code, the tool packs whatever content of the directories. I going to came up with PR addressing this issue sooner or later.

unrealsolver avatar Aug 29 '19 10:08 unrealsolver

I would benefit from this functionality as well

Alan-Penkar-QB avatar Sep 09 '19 19:09 Alan-Penkar-QB