<@U01JVDKASAC> Side note: I would love to talk to ...
# help
d
@Frank Side note: I would love to talk to you more about how we have our static sites overcoming this Lambda@Edge limitation and its working really well so far.
f
Hey @Dan Van Brunt, yeah it’s been a while since our last chat. We’ve made some improvements to the
StaticSite
since. It also helps you dynamically link the deployed urls, cognito config, etc with your frontend.
overcoming this Lambda@Edge limitation
Do you mean the edge functions not getting removed immediately on stack removal? I’d love to chat more about it.
d
@Frank Yes. First starters… we’ve built a routing edge-Lambda that provides the same functionality as Netlify’s
_redirects
file then deployed that “once-per-account” in aws. Then use that same edge lambda for all projects. This allows for project specific redirects, rewrites & proxies via that project’s
_redirects
file, but since the lambda is only deployed once… each project does not need to
delete
a replica, only the distro using it. Eg. clean, no error CFN stack deletes
Further to that, we have noodled a scenerio that might work if you HAD to have a project specific edge-lambda: You could set those functions to
retain
in the stack, allowing the stack to delete without error. And then use either a custom resource to kickoff a process to “delete function after 2hrs” or use have a similar process kicked off based on a CloudTrail event for a stack with a retained lambda being deleted.