- Newest
- Most votes
- Most comments
Hello.
I think you need to be the root user of the AWS account to perform operations such as MFA deletion of the S3 bucket.
Therefore, please sign in to your AWS account as the root user by following the steps in the document below.
https://docs.aws.amazon.com/signin/latest/userguide/introduction-to-root-user-sign-in-tutorial.html
After signing in as a root user, try running the following AWS CLI command.
I think you can disable it by specifying "MFADelete=Disabled" as a command option.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/put-bucket-versioning.html
aws s3api put-bucket-versioning --bucket DOC-EXAMPLE-BUCKET1 --versioning-configuration Status=Enabled,MFADelete=Disabled --mfa "SERIAL 123456"
Have you tried disabling MFA Delete using the root account? I think that's required.
That's the weird thing, I was doing all that from my root account and still can't disable the MFA Delete option. I even tried logging out and logging in multiple times to my root account.
Relevant content
- asked 6 months ago
- asked 7 months ago
- Accepted Answerasked 5 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 9 months ago
The weird thing is that I did all that from my root account. I tried again a few minutes ago following your steps and got the same from CLI "An error occurred (InvalidRequest) when calling the PutBucketVersioning operation: DevPay and Mfa are mutually exclusive authorization methods."
I think it's probably not running as the root user. Please try disabling MFA deletion after configuring the AWS CLI by issuing an access key for the root user as shown in the stackoverflow answer below. Be sure to delete the root user's access key when the operation is complete. https://stackoverflow.com/questions/45602558/devpay-and-mfa-are-mutually-exclusive-authorization-methods
I did that and it worked! Thank you!