-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mountCode: True with serverless-python-requirements #92
Comments
Problem with serverless-python-requirements, it's trying add requirements to unexist artifacte. pythonRequirements:
layer: true
# or
pythonRequirements:
zip: true For resolving by serverless-localstack need to extend skipIfMountLambda for override private js function like that. |
Hi @maranqz , thanks for reporting. Good catch about the js function that would have to be overwritten. Do you think you could try and help create a pull request to add this missing functionality? That would be really appreciated! Thanks for your help. |
Any movement on this? It still doesn't seem possible to mount python code into Localstack? The above options yield layer issues for me, even doing all the
Is it possible this is a limitation of the not-paid version of Localstack? |
Hi @whummer , gentle bump on this again. This problem still persists. I am still unable to mount the lambda code. |
Hi @chris-erickson @srinivaskalyani, thanks for the update, and apologies for the delay. In addition to the serverless.yml, could you please share a copy of your startup configs (e.g., docker-compose.yml) with us, so we can fully reproduce this use case end-to-end? Thanks for your help! |
Hi @whummer , service: thetenant-service
plugins:
- serverless-python-requirements
- serverless-pseudo-parameters
- serverless-localstack
custom:
pythonRequirements:
dockerizePip: false
layer: true
localstack:
stages:
- local
debug: true
host: http://localhost
edgePort: 4566
region: us-east-1
lambda:
mountCode: true
package:
exclude:
- ./**
include:
- my_serverless_root/**
provider:
name: aws
runstime: python3.7
stage: ${opt:stage, 'default_stage'}
tenant: thetenant
region: us-east-1
deploymentBucket: my-deployment-bucket
role: arn:aws:iam::#{AWS::AccountId}:role/MyLambdaExecutionRole
environment:
STAGE: ${self:provider.stage}
TENANT: ${self:provider.tenant}
functions:
my_function:
name: ${self:provider.tenant}-my-function
handler: my_handler_dir.aws.my_handler_file.handler
events:
- http: POST /my_api/endpoint |
Bump |
Assuming that this is resolved and you can mount your code, I am still wondering if you will be able to run this code. Because, the idea of using Am I missing the part where third-party dependencies are considered when using local code mounting? This issue also points to that problem localstack/localstack#6181 Can the packaging be forced, even with |
Hi @ptrhck, to best of my knowledge, the |
I'm running into the issue of being able to use mountcode with python, the lambda module is properly found, but dependencites are not. Any ideas what can be added? package: plugins:
localstack: yet for modules that should be loaded from the virtual environment I get load error |
If mountCode: True deploy crashing other hand mountCode: False deploy is ok.
serverless-python-requirements
serverless-localstack
serverless.yml
Slightly modified https://github.com/serverless/examples/tree/master/aws-python-line-echo-bot
serverless deploy --stage local
output┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: