Amazon Simple Storage Service
Developer Guide (API Version 2006-03-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Configuring a Bucket with MFA Delete

You have the option of enabling MFA Delete at the same time you specify the versioning state of the bucket. Once you configure a bucket so that it is MFA Delete enabled, all future requests to change the versioning state or delete a version require the request header x-amz-mfa: [SerialNumber] [AuthenticationCode]. Note the space between [SerialNumber] and [AuthenticationCode]. Requests that include x-amz-mfa must use HTTPS.

Example Enabling Versioning and MFA Delete

The following request enables versioning and MFA Delete on bucketName.

PUT /?versioning HTTPS/1.1
Host: bucketName.s3.amazonaws.com
Date: Wed, 12 Oct 2009 17:50:00 GMT
Authorization: AWS AKIAIOSFODNN7EXAMPLE:xQE0diMbLRepdf3YB+FIEXAMPLE=
Content-Type: text/plain
Content-Length: 124
x-amz-mfa: 20899872 301749

<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Status>Enabled</Status>
  <MfaDelete>Enabled</MfaDelete>
</VersioningConfiguration>