sls invoke local --function not working for non Node.js functions with standalone
See original GitHub issueBug Report
Description
- What did you do?
- I installed the test python3 AWS using:
serverless create --template aws-python3 --units-assignment
- What happened?
- I’m not able to run it locally but it works on AWS
- What should’ve happened?
- it should run locally with
sls invoke local --function start
- What’s the content of your
serverless.yml
file?
service: units-assignment
provider:
name: aws
runtime: python3.7
region: eu-central-1
# you can define service wide environment variables here
# environment:
# variable1: value1
environment:
APALEO_ID:
# you can add packaging information here
# package:
# include:
# - include-me.py
# - include-me-dir/**
# exclude:
# - exclude-me.py
# - exclude-me-dir/**
functions:
start:
handler: handler.start
- What’s the output you get when you use the
SLS_DEBUG=*
environment variable (e.g.SLS_DEBUG=* serverless deploy
)
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/snapshot/serverless/lib/plugins/aws/invokeLocal/invoke.py': [Errno 2] No such file or directory```
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Invoke Local - AWS Lambda - Serverless Framework
The invoke local command sets reasonable environment variables for the invoked function. All AWS specific variables are set to values that are quite...
Read more >aws "serverless invoke local" fails to run when node_modules ...
The problem is whenever I try to run sls invoke local I got a error messages due to package not found. So, the...
Read more >How to develop locally using serverless offline - Fauna
The plugin starts an HTTP server locally to handle request lifecycles and invoke handlers. Typically, this is run locally on a developer's ...
Read more >serverless-offline/community - Gitter
and it's on the initial start up not actually trying to invoke a function ... node ./postinstall.js. Thank you for installing [35mEJS [0m:...
Read more >Running and debugging AWS Lambda functions locally with ...
One of the complaints developers often have for AWS Lambda is the inability to run and debug functions locally. For Node.js at least,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This worked for me:
serverless uninstall && npm install -g serverless
I’m facing the same issue from a different mac.
@medikoo @Jun711 did you find the reason?