Invoke local doesn't work with individually packaging.
See original GitHub issueAre you certain it’s a bug?
- Yes, it looks like a bug
Is the issue caused by a plugin?
- It is not a plugin issue
Are you using the latest version?
- Yes, I’m using the latest version
Is there an existing issue for this?
- I have searched existing issues, it hasn’t been reported yet
Issue description
Probably the same issue as: https://github.com/serverless/serverless/issues/8729
Looks like the previous issue was addressed by PR but it still doesn’t work for me.
Service configuration (serverless.yml) content
service: xyz
frameworkVersion: '2'
provider:
name: aws
runtime: java8
lambdaHashingVersion: 20201221
package:
individually: true
functions:
downloader:
handler: xyz
package:
artifact: xyz.jar
events:
- sqs: xyz
Command name and used flags
serverless invoke local -f downloader -p eventmock.json
Command output
Serverless Error ----------------------------------------
Artifact undefined doesn't exists, please compile it first.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Environment information
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 17.0.1
Framework Version: 2.67.0
Plugin Version: 5.5.1
SDK Version: 4.3.0
Components Version: 3.18.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
sam build - AWS Serverless Application Model
Instructs AWS SAM to build a single resource declared in the AWS SAM template. The build artifacts for the specified resource will be...
Read more >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 >Understanding how packaged desktop apps run on Windows
In response to a file open command, the OS will open the file from the per-user, per-package location first. If this location doesn't...
Read more >Deploy on Kubernetes - Docker Documentation
This instantiates images required to run the Kubernetes server as containers, and installs the /usr/local/bin/kubectl command on your machine.
Read more >Publishing Extensions - Visual Studio Code
Packaging extensions. If you want to test an extension on your local install of VS Code or distribute an extension without publishing it...
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
Yes, the artifact is there. If I change packaging mode to default and provide artifact in top-level package clause, the local invocation works.
As for the debug output:
Also, I’ll try to prepare the example.
Any objection to me submitting a PR? I’ve basically taken what @pikinier20 submitted back in December and addressed the question raised in that pull request.