Daniel Gato
03/07/2022, 9:31 AM?The bucket you tried to delete is not empty with ReactStaticSite . Did something change on the last version?Frank
Frank
Daniel Gato
03/07/2022, 9:43 AMDaniel Gato
03/07/2022, 9:43 AMconst removalPolicy = app.stage === 'prod'
? RemovalPolicy.RETAIN
: RemovalPolicy.DESTROY;
app.setDefaultRemovalPolicy(removalPolicy);Daniel Gato
03/07/2022, 9:43 AMDaniel Gato
03/07/2022, 9:44 AMs3Bucket: {
autoDeleteObjects: scope.stage !== 'prod',
removalPolicy: scope.stage === 'prod'
? RemovalPolicy.RETAIN
: RemovalPolicy.DESTROY,
},
to our ReactStaticSite but it does not seem to do the job.Daniel Gato
03/07/2022, 9:51 AMFrank
autoDeleteObjects and removalPolicy always had default value of true and RETAIN for StaticSites’s s3 bucket.Frank
autoDeleteObjects, a custom resource is created backed by a Lambda function that removes all the files in the bucket. My guess for the scenario you mentioned above is that, after the xxxx-bar bucket was created, the CNAME record failed BEFORE the autoDeleteObject custom resource was created.Frank