Skip to content

sls package requires AWS profile to exist #6536

@massa-man

Description

@massa-man

This is a Bug Report

Description

  • What went wrong?
    Running sls package with a profile defined in YAML config, but that does not exist in the AWS cli throws an error.

  • What did you expect should have happened?
    The profile is not required to package (or was not required prior to v1.48.3), now it appears to be required, even if package does not use the profile at all

  • What was the config you used?

provider:
  name: aws
  runtime: nodejs10.x
  profile: ra_deploy_dev
  • What stacktrace or error message from your provider did you see?
$ sls package --stage=dev
 
  Error --------------------------------------------------
 
  Profile ra_deploy_dev does not exist
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          linux
     Node Version:              10.15.3
     Serverless Version:        1.49.0
     Enterprise Plugin Version: 1.3.4
     Platform SDK Version:      2.1.0

Similar or dependent issues:

Additional Data

I have a profile defined in my serverless.yml. I am building in my CI in two stages: build stage which setups, tests and packages the project, and a second stage, which deploys.

In the build stage I am not configuring the profile with the AWS CLI because it should not be necessary, and it never was in the past. With v1.49 I now get this error, as it looks the packaging command is validating the profile even though it should not be necessary for anything.

After some testing, the issue appears from v1.48.3 same as the one reported by #6436 but is slightly different and does not get solved by that fix.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions