Is there an existing issue for this?
Use case description
Hello everyone.
After incorporating serverless-python-requirements into the framework, I encountered a problem: there's no way to create separate layers, each with its own dependencies.
Let's say I have three functions:
cognito_post_confirmation - it only needs pydantic
cognito_post_authentication - it only needs ulid
shop - it needs FastAPI, meaning it will automatically install pydantic
To keep size of functions small and uptimize coldstart, my idea was to create three layers:
clear - for functions with minimal packages - only ulid
pydantic - for functions that only require pydantic
fastapi - for functions that require FastaAPI
and I'll include these layers in the corresponding functions.
As far as I know, the serverless-python-requirements plugin allows you to set dependencies for layers. However, in new versions of the serverless framework, it has been integrated into the framework, and now the "layer: true" parameter builds a single dependency layer, uniform for all. Question:
- Am I misunderstanding something?
- Is there another way to set a separate dependency for each layer using a separate requirements.txt file?
Proposed solution (optional)
No response
Is there an existing issue for this?
Use case description
Hello everyone.
After incorporating serverless-python-requirements into the framework, I encountered a problem: there's no way to create separate layers, each with its own dependencies.
Let's say I have three functions:
cognito_post_confirmation - it only needs pydantic
cognito_post_authentication - it only needs ulid
shop - it needs FastAPI, meaning it will automatically install pydantic
To keep size of functions small and uptimize coldstart, my idea was to create three layers:
clear - for functions with minimal packages - only ulid
pydantic - for functions that only require pydantic
fastapi - for functions that require FastaAPI
and I'll include these layers in the corresponding functions.
As far as I know, the serverless-python-requirements plugin allows you to set dependencies for layers. However, in new versions of the serverless framework, it has been integrated into the framework, and now the "layer: true" parameter builds a single dependency layer, uniform for all. Question:
Proposed solution (optional)
No response