AWS AmazonS3 documentation change
Summary
Added detailed instructions for restoring previous object versions by deleting current versions and clarified CLI usage for copying previous versions.
Security assessment
The changes provide operational guidance for version restoration without addressing vulnerabilities or security weaknesses. No security incidents or vulnerabilities are referenced.
Diff
diff --git a/AmazonS3/latest/userguide/RestoringPreviousVersions.md b/AmazonS3/latest/userguide/RestoringPreviousVersions.md index 7e84fa15a..8c2ac55c5 100644 --- a//AmazonS3/latest/userguide/RestoringPreviousVersions.md +++ b//AmazonS3/latest/userguide/RestoringPreviousVersions.md @@ -43,0 +44,27 @@ For more guidance on restoring deleted objects, see [How can I retrieve an Amazo +You can restore a previous version of an object using the Amazon S3 console by deleting the current version. Deleting the current version makes the previous version the new current version. + +###### To restore a previous version by deleting the current version + + 1. Sign in to the AWS Management Console and open the Amazon S3 console at [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/). + + 2. In the **Buckets** list, choose the name of the bucket that contains the object. + + 3. In the **Objects** list, choose the name of the object. + + 4. Choose **Versions**. + +Amazon S3 shows all the versions for the object. + + 5. Select the check box next to the **Version ID** of the current (latest) version that you want to delete. + + 6. Choose **Delete**. + + 7. In the **Delete objects** dialog box, enter `permanently delete`, and then choose **Delete objects**. + +After you delete the current version, the previous version becomes the current version. + + + + +###### To download a previous version + @@ -62,0 +90,4 @@ You also can view, download, and delete object versions in the object overview p +###### Note + +To copy a previous version in place (making it the new current version), use the AWS CLI or AWS SDKs — this approach isn't available in the Amazon S3 console. For an example, see the AWS CLI tab. + @@ -66,0 +98,10 @@ You can undelete an object only if it was deleted as the latest (current) versio +To restore a previous version by copying it in place, use the `copy-object` command. For the `--copy-source` parameter, specify the version ID of the previous version that you want to restore: + + + aws s3api copy-object \ + --bucket amzn-s3-demo-bucket \ + --key my-object.jpg \ + --copy-source amzn-s3-demo-bucket/my-object.jpg?versionId=previous-version-id + +This creates a new current version of the object with the content from the specified previous version. Amazon S3 preserves all existing versions. +