Hi all, We have a monorepo for our backend. Is the...
# seed
s
Hi all, We have a monorepo for our backend. Is there any Seed API. given a stage name or MR name, we can fetch the outputs for all the services in the repo ? Our frontend is hosted in vercel and we are thinking how we can make the workflow simple. Currently API gateway base urls, cognito identity pools etc we need to manually copy paste
t
You could have a lambda that serves up all that information. Or use an SST onstart script that uses the vercel API client to trigger the deploy with the secrets
s
I am writing this, in alpha, would it fit your use case? Any feedback? I am currently using it myself and it supports sending config to preview deploys already https://www.npmjs.com/package/@cdk-utils/vercel-secret-forwarder
Alternatively just copy my sauce, it's not a hard thing to put together https://github.com/simonireilly/aws-cdk-utils/tree/main/packages/custom-resources/vercel-secret-forwarder
s
Thanks I will check this out.
f
An upside with using a
Script
construct like @Thomas Ankcorn suggested is that if the
Script
fails, the
sst deploy
itself fails.
If that’s not the desired behavior, you can add a Post-Deploy Phase to fetch all the outputs and forward them to vercel https://seed.run/docs/adding-a-post-deploy-phase.html
s
How do I access the outputs using AWS apis like boto3 and calling cloudformation functions ?
f
You can try using the
aws cloudformation describe-stacks
AWS CLI command.