clean up: always sending x-amz-bypass-governance-retention
bentsku opened this issue · comments
Ben Simon Hartung commented
Hi and thank you so much for this very useful tool, it is really awesome!
It seems there's an issue with the cleanup, it always sends the x-amz-bypass-governance-retention
header, but AWS or other tools will respond with an exception:Invalid argument: x-amz-bypass-governance-retention is only applicable to Object Lock enabled buckets.
It seems it is here:
Line 218 in 3dd0180
One fix would be to validate if the bucket has it enabled beforehand with a call to GeObjectLockConfiguration
. I'm not very proficient in go, I could try to have a look.
Thanks again for this excellent tool!