Hi guys, I am facing cross stack reference error. ...
# help
m
Hi guys, I am facing cross stack reference error. I have multiple http APIs behind a single cloudfront origin. now I am unable to update apig. here is the sequence. app -> cognito stack -> dynamo stack -> s3 stack -> 3x (api stack) -> cdn stack. I can clearly see that cdn stack is using import value from api stacks. any idea what could be the right way of resolving this?
trying
sst deploy <stack>
to see if this works
t
What's the error exactly
m
I have a single cloudfront (cdn stack) with multiple apig behaviours. i have passed apig urls to cdn stack which created cross stack refs. now I am unable to update any API module. Eg;
qa-mos-users-stack Export qa-mos-users-stack:ExportsOutputFnGetAttusersApi081DAE55ApiEndpointC9571422 cannot be deleted as it is in use by qa-mos-cdn
I am unable to update neither lambda code nor add/update API routes.
I found this article. It looks promising but I am not sure how to implement it.
t
Your idea of deploying one stack at a time is correct
Try deploying qa-mos-cdn first
m
That's what I did, I removed the dependency and deployed qa-mos-cdn then updated qa-mos-users stack and redeployed qa-mos-cdn with dependency. Worked flawlessly, but I had downtime for 1 hr. because my users APIs were not reachable from cloudfront. 😕
m