Is it possible to deploy only one function even th...
# sst
b
Is it possible to deploy only one function even though if stack has multiple functions?
t
Unfortunately it's not possible with how cloudformation works. Can you tell me a bit more about why you want to do this?
a
But SLS does it, how it does it?
t
They deploy it manually outside of cloudformation using the aws api directly. I think we need to understand the workflows where people want to do this better so we can think about how to address them
We might need to start considering this as there's a related issue around switching between start vs deploy being made faster by just swapping out the zip files in lambda
a
That makes sense.
b
I need to onboard the customer based on their features request. Let's assume x client want a,b,c feature which present in stack and y client want a,b feature which present in the same stack. So while onboarding the customer I don't want to deploy the c feature for y client.
If is there any alternate way please let me know.
@thdxr Do we have any alternate way?
t
Are you deploying a stack per customer? You should pass in props to the stack to determine what to deploy
b
No. I'm not using stack per customer. I don't want to deploy a function in stack based in customer feature request. Do you've any example?
t
You can pass in props into the stack to determine what to deploy. I'll write an example soon, however I'm not sure how you can deploy multiple versions of your app without creating a new instance of a stack per customer
Copy code
new Stack(app, "Customer1", { feature1: false })
Then in the stack you can avoid deploying certain features if feature1 === false