aws-cloudfront icon indicating copy to clipboard operation
aws-cloudfront copied to clipboard

fixed removal of cloudfront distribution

Open evgsil opened this issue 5 years ago • 4 comments

Previously active (enabled) distributions were never removed only disabled

evgsil avatar Sep 25 '19 11:09 evgsil

@evgsil wish you opened up an issue first. Wouldn't that cause the removal to take a long time to complete? Which would affect overall deployment. This is something that happens with CloudFormation that we wanted to avoid both for deployment and removal.

eahefnawy avatar Sep 26 '19 10:09 eahefnawy

Yes, it would take much more time, but it actually does the job (distribution is removed). As far as i understand, slow speed is not CloudFormation issue but issue of CloudFront itself. It just takes a lot of time for AWS to sync changes between CloudFront edge locations.

evgsil avatar Sep 26 '19 10:09 evgsil

@evgsil I'm more concerned with the DX of this. Based on my experience with both CloudFormation and components, I deploy and remove quite often during development. Having to wait this long every time is killer. Imo it's just easier to manually remove the distribution if you really MUST do that. Alternativley, we might have that as an input option (remove: true).

This is even more problematic that we don't yet have remote deployment engine, so your terminal must be running this whole time for the deployment/removal to complete. Maybe once we have remote deployment engine, it might make more sense.

I'm gonna leave this PR open for more feedback. Hope you understand 😊

eahefnawy avatar Oct 07 '19 12:10 eahefnawy

Personally I wouldn't mind waiting for the distribution to be actually deleted, specially if that's what I'm expecting. Users are not warned about it. An input option sounds like a good compromise.

urtens avatar Jul 01 '20 07:07 urtens