question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`serverless package` doesn't honor the artifact and package individually configuration

See original GitHub issue

This is a (Bug Report)

Description

I’m trying to use this command: serverless package --stage devd --account dev to create packages for my AWS Lambda functions and it doesn’t work properly.

It’s supposed to use the files that I reference in the artifact property instead it archives the root zip folder.

What went wrong?

When using serverless package command with config artifact and package.individually: true it zips/archives the whole root folder instead of honoring the configuration in the serverless.yml file.

What did you expect should have happened?

I’m trying to use the artifact and package.individually: true to have separate packages for each of my function and use the zip files that I generate with gulp.

What was the config you used?

service: test

package:
  individually: true

provider:
  name: aws
  runtime: nodejs6.10
  stage: ${opt:stage}
  region: us-east-1
  profile: ${opt:account}

functions:
  hello1:
    handler: handler1.hello1
    package:
      artifact: dist/hello1.zip
    events:
        - schedule: rate(1 minute)
  
  hello2:
    handler: handler2.hello2
    package:
      artifact: dist/hello2.zip
    events:
        - schedule: rate(1 minute)

What stacktrace or error message from your provider did you see?

None.

Similar or dependent issues:

Additional Data

  • Serverless Framework Version you’re using: v.1.14.0
  • Operating System: Windows 7
  • Stack Trace: None.
  • Provider Error messages: None.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kyeoticcommented, Jun 20, 2017

@dlcron @HyperBrain This bug has been stopping us from upgrading from 1.11.0, and serverless is up to 1.15.3. Has there been any update on it?

1reaction
dlcroncommented, May 25, 2017

Right, so we have the bug here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Packaging - Serverless Framework
Packaging functions separately ... If you want even more controls over your functions for deployment you can configure them to be packaged independently....
Read more >
altering paths inside serverless artifact - node.js - Stack Overflow
I have serverless.yml in the main directory, plus two individual config files for the two "services." My preference is custom pack the zip,...
Read more >
serverless | Yarn - Package Manager
Serverless Framework - Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more.
Read more >
serverless-webpack - npm
When enabled in your service configuration, functions are packaged and compiled individually, resulting in smaller Lambda packages that contain ...
Read more >
nri-bundle 4.7.3 · helm/newrelic - Artifact Hub
Groups together the individual charts for the New Relic Kubernetes solution for a more comfortable deployment.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found