Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Mangaing dev and prod stages #601

Closed
BoazKG93 opened this issue Sep 11, 2020 · 3 comments
Closed

Mangaing dev and prod stages #601

BoazKG93 opened this issue Sep 11, 2020 · 3 comments

Comments

@BoazKG93
Copy link

Using the old serverless staging feature, I could easily manage and switch between stages (dev/prod). With the new configuration file, e.g.

treedis:
  component: "@sls-next/[email protected]"
  inputs:
    bucketName: "treedis-assets"
    bucketRegion: "us-east-1"
    name:
      defaultLambda: treedis-default-router
      apiLambda: treedis-api

I couldn't find any way to manage to different CloudFront distributions in the same serverless.yml file. I also didn't see anything in the documentation regarding this. This is extremely important, every single developer uses at least 2 environments, one for development and one for production. Without this feature this component wouldn't be usable as much.

@dphang
Copy link
Collaborator

dphang commented Sep 11, 2020

See the thread/comment here for possible interim solutions: #328 (comment)

The component needs to be upgraded to GA serverless components version to remotely store state in Serverless, which I believe is one of the reasons to not support this well... in the meantime you can use above solutions which sync state to S3 and maintain multiple serverless.yml files for each stage.

@SarKurd
Copy link
Contributor

SarKurd commented Sep 11, 2020

@BoazKG93
Copy link
Author

Thanks for the prompt responses. I will check this out!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants