Uploading additional files to Lambda using serverless

v4
cli

#1

Hi,

Is there a way to deploy app related files like yaml & json files along with index.js & index.js.map files in bundle directory to AWS Lambda using serverless target?

I tried to copy the required files to bundle dir, but when I ran jovo deploy:code serverless , it is uploading just index.js and index.js.map but not other files which are in bundle dir.


#2

Is there a reason you specified deploy:code rather than just deploy?


#3

I v4, we split the deployment commands into deploy:platform (to push the project files in the build to the platform developer consoles) and deploy:code (to upload the Jovo app source code from src to a server/cloud provider). Learn more here: https://www.jovo.tech/docs/deploy-command

I think this would be something to be done by updating the serverless.yml file: https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml#package

The Jovo Serverless integration bundles the files using npm run bundle:<stage> (the default stage is dev, learn more about staging here) and then calls the serverless deploy command (which uses the serverless.yml file)


#4

I just created a PR which improves the documentation for the Serverless integration: https://github.com/jovotech/jovo-cli/pull/304

Edit: It’s online now https://www.jovo.tech/marketplace/target-serverless


#5

@jan Thanks for the pointers are documentation updates.