serverless-domain-manager: Serverless package should not require AWS credentials

As a Serverless developer, I want to run serverless package without specifying AWS credentials, so I don’t have to configure my cloud secrets in my build system, which is independent from my deployment system.

Since serverless create_domain is a separate step, creating the domain can be easily separated from creating and deploying the package. In our case, we created the domain once manually, and our CI system runs only serverless package to build and test the package, before our CD system installs it with serverless deploy. The serverless package step has nothing to do with our cloud infrastructure, so it should not need credentials to access it. It was working fine with serverless-domain-manager up until to version 1.1.18, but from 1.1.19 even the serverless package step requires AWS credentials, otherwise the getDomain call fails, and the “Cannot find specified domain name…” error is displayed.

Thank you for creating and maintaining this package.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 6
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@elyobo Thanks for commenting on this issue. Could you please explain why it is more appropriate to closely tie the building step to the deploying step? In that case when should we run our tests? What is the reason behind having a separate sls package and sls deploy command?

@oli-g Sure, let’s roll it back. If anyone here wants to submit a PR to that affect, that’d be great. Otherwise I’ll send something up sometime this week.

Actually I found that this issue was caused by this PR, which I consider simply not correct: in a CI pipeline, the packaging step should just create the package, then the deploying step should just deploy that package and set other stuff, like domain names, etc…

@jconstance-amplify What do you think? Is it feasible to rollback that PR?

@balassy I think you misread my comment, I was agreeing with you that it should be done at deploy time (as it was before) and not at packaging time.

Thanks for the comment, @erauer. I see, understand and appreciate the author’s intention of “playing nicely with other packages”. However as I see this is a breaking change, and the situation I described above is real and may affect not only my projects, so I would appreciate any guidance or workaround to solve it.

Thanks again.