Open nserbass opened 1 month ago
Just chiming in to +1 this since we have a similar limit for our team. I imagine this would be a common use-case for teams that work in orgs with arbitrary limits on cache policies.
I also ran into this the other week after capriciously creating a bunch of SST Ion prototypes until this popped up. Luckily, I was able to delete other ones as a short term stop gap.
Based on the docs, it wasn't clear to me how to use this transform param.
Yeah this sounds like something we should try and handle internally. Let me ask the team.
Note: In SST 2 this was possible as per these docs: https://docs.sst.dev/constructs/NextjsSite#reusing-cloudfront-cache-policies
This was addressed and solved by @fwang before in SST 2 and I've never had an issue with it. But, in SST Ion, it's a blocker for my case due to AWS' hard limit of 20 cache policies.
Will really appreciate an update on this :heart: :pray:
Use case: My team is using SST to deploy a Nextjs application in multiple stage environments for testing feeatures before deploy to production (another env deployed by sst).
Problem: Due to aws cloudfront cache policy limit, we can't create too many environments because we reach the limit quickly (20)
I've followed your documentation about transform function. I've tried several implementations but always creates a new one and throws errors with missing defaultCacheBehavior parameters:
Any ideas?
Thank you!