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.

Deploying does not rely on artifact config parameter

See original GitHub issue

This is a bug report

What went wrong?

Running sls deploy does not take the artifact parameter into account, it zips the whole directory and deploys it rather than just take the artifact.

What did you expect should have happened?

sls deploy should (it did yesterday):

  • Deploy artifact zip file when it exists;
  • Fail when artifact zip file does not exist

What was the config you used?

service: poipoi

frameworkVersion: ">=1.12.0"

provider:
  name: aws
  runtime: python3.6
  stage: dev
  region: us-east-1
  memorySize: 128
  timeout: 300
  # KMS Key used for encryption/decryption
  kmsKeyArn: arn:aws:kms:us-east-1:XXXXXXXXX:key/XXXXXXX

package:
  artifact: poipoi.zip

custom:
  actual_stage: ${opt:stage, self:provider.stage}
  dev:
    audience: XXXXXXX
    client_id: XXXXXXX
    # client_secret is encrypted using KMS poipoi/lambdas
    # $ aws kms encrypt --key-id alias/poipoi/lambdas --plaintext <secret>
    client_secret: |
      AXXXXXXXXXXXXXXXXXXXXXXdqT/KPS365PqQ4jY5Vi64RpFiVwAAAKIwgZ8GCSqGSIb3DQEHB
      XXXXXXX...
    log_level: DEBUG
    oauth_token_url: XXXXXXX
    poipoi_url: XXXXXXX


functions:
  poipoi:
    handler: poipoi.handler
    events:
      - stream: arn:aws:kinesis:us-east-1:XXXX:stream/XXXXX-${self:custom.actual_stage}
    environment:
      poipoi_url: ${self:custom.${self:custom.actual_stage}.poipoi_url}
      client_id: ${self:custom.${self:custom.actual_stage}.client_id}
      client_secret: ${self:custom.${self:custom.actual_stage}.client_secret}
      audience: ${self:custom.${self:custom.actual_stage}.audience}

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

None.

It just zips everything and deploys it.

Then AWS Lambda fail constantly as the package deployed is non-sense.

Thanks!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
hadriencommented, Apr 26, 2017

SORRY 📣
😢 I was using a dev version of serverless

0reactions
pmuenscommented, May 26, 2017

@shikasta-kashti thanks for opening! We’ll look into it 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configurable Artifacts: Deploy Code Like a Pro
Configurable artifacts are a deployment method used to ship code to various environments in a single build. Read on to learn how to...
Read more >
Deploying Artifacts - JFrog Documentation
Overview. In the Artifact Repository Browser, you can deploy artifacts into a local repository from the Artifacts module by clicking Deploy ...
Read more >
Failed to deploy artifacts: Could not find artifact
A very simple way to fix this is just by changing/updating the version in the pom.xml file. Suppose 01.16.03 is already used then...
Read more >
Trigger Deployments When a New Artifact is Added to ...
You can trigger Harness Workflow and Pipeline deployments in response to a new artifact being added to a repository.
Read more >
How to: Artifact-based Deployments - Mobile App ...
If your architecture doesn't allow for containerisation then you can look to introduce your own artifact repository such as Nexus and build up...
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