Using the AWS s3api CLI, enable MFA Delete for the S3 buckets that fail this rule, for example:
aws s3api put-bucket-versioning --bucket bucketname --versioning-configuration Status=Enabled,MFADelete=Enabled --mfa "your-mfa-serial-number mfa-code"
but getting this error: An error occurred (AccessDenied) when calling the PutBucketVersioning operation: This operation may only be performed by the bucket owner.
Even I tried creating new bucket to do this but same error am getting. has anyone gone through this?