sst / ion

SST v3
https://sst.dev
MIT License
2.14k stars 250 forks source link

Clarification needed: Using sst dev vs sst deploy after adding secrets (Not really a bug) #1311

Open ironbyte opened 1 day ago

ironbyte commented 1 day ago

When adding secrets to an SST project using AWS as a provider for a Remix app, the docs instruct to run sst deploy after using the sst secret set command. However, sst dev also appears to work and is pretty faster. I've verifed that the secret's properly added on my AWS account.

Steps to reproduce:

  1. Run sst secret set StripeKey st_1234
  2. Instead of sst deploy, run sst dev

Observed behavior:

  1. sst dev works and is much faster (in seconds)
  2. Changes take effect without running sst deploy

Question:

Are there any repercussions or potential issues when using sst dev instead of sst deploy after adding secrets? Maybe SST docs are a bit outdated regarding this?

jayair commented 12 hours ago

No they both work, sst dev is doing the deploy for you. It's just the docs doesn't assume that you are running sst dev all the time, so it's asking you to explicitly do a deploy.

jayair commented 12 hours ago

The other aspect to this is you might be setting the secret for a stage that you don't usually run sst dev on.