I've enabled MFA delete for root user. But if I want to give such rights to certain non-root user as well. I've configured aws using root credentials and using the following command to enable mfa delete on root:
aws s3api put-bucket-versioning --bucket --versioning-configuration Status=Enabled,MFADelete=Enabled --mfa " "
For non-root user, I'm using arn of user to which I want to give access and mfa-code for the same. However, aws is throwing following error: An error occurred (InvalidAccessKeyId) when calling the DeleteObject operation: The AWS Access Key Id you provided does not exist in our records