You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
// it doesn't throw errors but creates a new cache policy as wellnewsst.aws.Nextjs("MyWeb",{
environment,domain: customDomain,transform: {cdn: (args)=>({
...args,defaultCacheBehavior: {
...args.defaultCacheBehavior,cachePolicyId: 'f99c40f2-50bf-4215-8023-125e7a46fb0e'}})}});
Any ideas?
Thank you!
The text was updated successfully, but these errors were encountered:
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.
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!
The text was updated successfully, but these errors were encountered: