I’m interested in refactoring some existing resour...
# help
t
I’m interested in refactoring some existing resources to a separate stack, notably a
Distribution
. Are there any examples/guides on how to do this with SST?
f
Hey @Ted Mader, moving a resource to a new/different stack will recreate it. Is that okay w/ ur setup?
t
Not for this case. I would need to keep the old
Distribution
’s endpoint at least
f
The only way to move a
Distribution
from 1 stack to another while keeping the same endpoint would be to use CloudFormation’s Import feature. While we’ve got some plans to provide helper tools to simply importing, but at the moment, you’d have to do it through manually via the AWS CloudFormation console. Here are the steps https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/refactor-stacks.html
That said, if you used a custom domain for the
Distribution
> create a new
Distribution
in another stack > flip the domain to point to the new
Distribution
Would that be an option for you?
t
Those docs were the steps I was planning to follow, was hesitant just in case SST offered a simpler solution. Unfortunately no custom domain at the moment. Thanks for the response! 👍