Q1: Is there a way to run SST against <localstack>...
# help
g
Q1: Is there a way to run SST against localstack?
t
I'm familiar with localstack but never used it. SST is built around the concept of using real AWS as much as possible and emulating as little as possible locally. Would like to hear more about what your usecase with localstack is. SST shouldn't be preventing you from using it just requires redirecting aws calls to something local
a
You don’t need localstack, it is considered an anti-pattern.
g
You need localstack on an airplane 😉
a
If you want to use localstack, maybe better stick to CDK or SLS.
And not SST.
I mean, you are not going to get too much advantages.
t
SST won't work on an airplane unfortunately 😢 I'll be on one today and it'll be local only development for me
a
Better enjoy the flight @thdxr 🙂
g
@thdxr you mentioned “redirecting aws calls to something local”. How would I approach that in SST?
t
I actually don't know how localstack works let me take a look real quick. I assumed they ran a local aws api and there was a way to tell aws-sdk to go there
Oh do you want to deploy everything to localstack? Like runningcloudformation locally and all?
If so I don't think this will work
g
Yes, I was thinking about pointing SST to localstack. As far as I understand all the necessary pieces exist in localstack to support SST (cloudformation, aws lambdas and websockets).
t
we do a lot of weird stuff in SST where we call into cdk code. We don't offer a way to pass in
endpoint-url
to talk to localstack
Totally get your need for a local workflow but SST was really designed around the other extreme of running almost nothing locally so I'm not sure if we'll really be able to support it without compromise
We had a recent discussion around this if you want to poke through it: https://serverless-stack.slack.com/archives/C01JVDJQU2C/p1629995491017300
g
Thanks for pointing me to the discussion. This clarifies your vision of sst for me. And I cannot argue with the assessment re compromises. Thank you.
a
@Gevorg A. Galstyan we moved from SLS and Localstack to STS because with this you don't really need to run anything locally (at least manually). It handles that for you by redirecting requests to and from your resources in cloudformation. Maintaining that locally even with localstack is a pain. Even if you use it with SLS you still get a lot of problems with SLS offline to work properly with localstack because of multiple plugins that you have to install and figure out which one works better and is compatible with others