https://serverless-stack.com/ logo
#sst
Title
# sst
j

Joel Corona

09/13/2021, 9:53 PM
Hi there, is there a possibility of raising several instances of the project locally? If a teammate raises his instance, mine stops it, e.g.
f

Frank

09/13/2021, 10:17 PM
Hey @Joel Corona, each of ur teammates just have to use a different stage name.
j

Joel Corona

09/13/2021, 10:18 PM
Thx @Frank
f

Frank

09/13/2021, 10:18 PM
The scenario you are describing often happens when u and ur teammates are sharing the same AWS account.
And if everyone is using the same stage ie.
dev
, only 1 person can run
sst start --stage dev
and he will kick out the previous person
j

Joel Corona

09/13/2021, 10:19 PM
uhmm that its
t

thdxr

09/13/2021, 10:21 PM
@Joel Corona what version of sst are you using?
f

Frank

09/13/2021, 10:23 PM
We actually released a change to address this recently v0.41.0. 1. upgrade to the latest SST 2. remove
stage
from your
sst.json
3. next time when you run
sst start
, it will prompt you for a personal stage, for example u can use the stage name
joel
4. SST will store the stage name inside
.sst
5. add
.sst
to ur
.gitignore
So if everyone on ur team followed this, when running
sst start
, each person would automatically use their personal stage name stored in their
.sst
p

Phil Astle

09/14/2021, 8:46 AM
Can I suggest a small tweak to the implementation for this? When I followed these instructions it tried to set an invalid stage name because of an _ in my username. Can you tweak the script to make it suggest only valid defaults?
t

thdxr

09/14/2021, 12:24 PM
ah good catch, will make an issue
j

Joel Corona

09/14/2021, 4:56 PM
Hi there, where can I get an example of the .sst file? @Frank @thdxr
t

thdxr

09/14/2021, 4:57 PM
There is no
.sst
file, there's a new folder in the latest versions that includes a
stage
file where we temporarily store the local stagename.
j

Joel Corona

09/14/2021, 4:58 PM
oh nice
j

JP (junaway)

09/16/2021, 11:09 AM
@Joel Corona If you have shared infrastructure that you do not want to replicate for each developer in your team, you can also extract it into another stack and then map your stacks and stages appropriately.