Skip to content

Serverless deploy with --package and --aws-profile #5150

Open

Description

@GeekOnGadgets

This is a Bug Report

Description

Created CI/CD pipeline to deploy lambda function. In build step, package using serverless package and push .serverless directory to s3 artifacts bucket. In deploy step use the build package from s3 to deploy to different env using `serverless deploy --aws-profile ${ENV} --package path-to-folder

Note: I am passing the deploymentBucket as variable during deploy step. I also have serverless.yml in as referred in this #4715 issue.

For bug reports:

  • What went wrong?
Serverless Error ---------------------------------------

  Resource ServerlessDeploymentBucket does not exist for stack bucket
  • What did you expect should have happened?
    Expected to use the profile and deploy using already created build
  • What was the config you used?
service:
  name: ${env:SERVICE_NAME}-lambda

# Add the serverless-webpack plugin
plugins:
    - serverless-webpack
    - serverless-offline
    - serverless-offline-scheduler
provider:
    name: aws
    runtime: nodejs6.10
    stage: ${env:ENV}
    region: ap-southeast-1
    deploymentBucket: ${env:BUCKET_NAME}
  • What stacktrace or error message from your provider did you see?
    None from AWS provider.

Additional Data

  • Serverless Framework Version you're using:
    Serverless Version: 1.28.0
  • Operating System:
    OS: darwin
  • Stack Trace:
  • Provider Error messages:

Note: I was able to put a workaround removing --package flag from serverless deploy, which worked but it did build it again. Which makes my build stage obsolete.

Thank You :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions