Does SST or CDK-pros have any guidance on potentia...
# sst
b
Does SST or CDK-pros have any guidance on potentials around “post deploy” hooks for scripting additional
aws-sdk
work against resources? One limitation with CDK/Cloudform in my experience is the
sync
(vs.
async
) nature of it all - it’s the key reason I do love terraform, ability to interrogate deployed resources and use APIs to modify them (outside of the creation). Specifically, I’m looking at some additional SNS Topic properties, which led me to https://stackoverflow.com/a/65703536 (and I’ve verified cloudform still does not support modifying these properties).
t
Yeah Terraform is a lot cleaner in so many ways
You can use a Custom Resource Definition which is basically just a lambda that runs after things are deployed. We use them in a few places inside SST
b
riiiight, yeah
I think CDK actually does this already under the hood doesnt it? hence the “CDK Toolkit” stack that gets deployed
t
I never actually looked into what's in there but that makes sense
b
@thdxr can you point me into direction/location where SST does this? wouldn’t mind ape-ing ya’lls pattern there
nbd if it’s pain, I’ve toy’ed with this before - but a clean start using SST standards would be premium
t
SST internals usually aren't usually great examples of best practices because we choose to absorb a lot of complexity if it makes it easier for the user. So sometimes we do ugly things because it makes things less ugly for the user
b
which we do appreciate lol
b
cool, yeah - I can follow along there
t
Be careful with them as if they error your stack gets in a weird place and is annoying to delete
b
good advice, thanks 👌
t
hould be using this
b
✔️ thanks
t
just a small fyi here - we did a smile bash script for our project - to be able to do some black magic after the deployment - we use it when working locally as well as CI (Github Actions) - I know it adds yet another layer - but still - it was simple to do and does the trick