I kind of wish that sst would not create a project...
# general
a
I kind of wish that sst would not create a project on install eg. create-sst and it could run manually with configuration flags. I can’t generate the a new proeject in my current gitpod enviroment because it attempts to wipe the Readme, and do things to .git so I have to generate it in a seperate directory and the move the contents over
t
so you'd like it to create in the current directory?
I have seen other create-xxx work that way
a
I guess it doeesn’t wipe the Readme. Yep, I tell it
.
on creation but my gitpod env doesn’t like it
I went back to replicate to show what I had, but I guess if it works it works
GItpod was having lots of problems yesterday so maybe it was Gitpod and at a glance I mistaken SST as the issue
Now I just wonder if there are flags like:
Copy code
npm int sst -y --language=typescript --project-dir=.
@Frank is there a way I can do this ?
t
Doesn't support that yet but we can add it
I've been reworking create-sst a bit
a
Copy code
{
  "name": "@@app",
t
Ah ok we're currently using the name you pass in for the directory as the app name
So passing in
.
Might confuse things
a
I figured as much
I wonder if its just because it couldn’t grab the folder name (or not coded) to do so
I’ll just attempt to updatae the name manually
t
Need an @
@bar-raiser-participant/api
It's confusing because we use @@ for replacement
there's three @@@
a
I was tempted to write some sed commands but they’re a pain in Ubuntu lol
renaming manually is not a big deal
As I build both my apps I’m documenting every single step
t
That's great, you'll definitely be able to help us identify some rough edges we can fix
a
Hmm okay, I’ll have to go back to generating in another directory, and then wrting some bash commands to move it into the current directory
Ah so sst doesn’t generate an SST just it blows away everything in the current directory.
I’ve just gone back to creating subfolder and moving contents
no biggie
Copy code
sh
mv  -v /workspace/bar-raiser-particpant/bar-raiser-particpant/* /workspace/bar-raiser-particpant/
mv  -v /workspace/bar-raiser-particpant/bar-raiser-particpant/.* /workspace/bar-raiser-particpant/
rmdir /workspace/bar-raiser-particpant/bar-raiser-particpant/
I find this confusing because we see the word
stage name
so I think staging environment. Then I see
locally
I’m thinking its setting up an environment (a landing zone) for my sst app in AWS, so I would this would be
dev
environment we traditionally see, I don’t know why it would recommend the name of the app
Copy code
Look like you''e running sst for the first time in this directory. Please enter a stage name you'’ like to use locally. Or hit enter to use the one based on your AWS credentials (BarRaiserParticpant):
Hmm so this generates the debug stack. okay I remember seeing that before. I guess the above wording should really tell you its going to be call the debug stack
Copy code
Look like you're running sst for the first time in this directory. Please enter a stage name you'd like to use locally. Or hit enter to use the one based on your AWS credentials (BarRaiserParticpant): dev
Using stage: dev
Preparing your SST app

=======================
 Deploying debug stack
=======================
So in CloudFormation it gets called this:
dev-bar-raiser-particpant-debug-stack
t
The name it recommends is usually the name of your iam profile which is usually something like
andrew
or
dax
we ask for a name for your "personal environment" and maybe we should change the copy to reflect that
it's not just the debug stack it uses this name to prefix all of your stacks so if we're both working on it my stuff stays separate from your stuff
a
Ah I see
In my instructions I tell people to setup a
machine user
for credentials, and I wasn’t suggesting their own account
This is because often in AWS when you have app workloads this is what you would do.
I guess I’m not sure how you specific the credentials just for production workload
t
We don't do anything specially in general, we follow general AWS cli conventions. So for my locally I'm using AWS sso and I have a profile that uses that I deploy through github actions so I have that setup with AWS OIDC
I also have profiles locally for prod if I want to deploy directly, usually do something like
AWS_PROFILE=mybusiness-production yarn sst deploy --stage=production
a
Gotcha
There’s no safe way to support multiple IAM profiles in Gitpod really… (If I want prod and my personal account)
But I guess there’s probably somekind of GitOps I can do for production eg. Github Actions