Object Versioning object operations
Estimated time to read: 1 minute
On this page you can find information about using Object Versioning object operations.
Creating objects with Object Versioning requires a bucket with Object Versioning enabled. Enable Object Versioning.
List objects
To list all non soft deleted objects:
To list all objects:
Retrieve a subset of objects
To filter output you can use --prefix <value>
to retrieve only a subset.
For example:
Get an Object Version
To get a specific object by its version:
aws s3api get-object --bucket <bucket_name> --key <object_name> --version-id <version_id> <local_file_path>
Soft delete an Object
To soft delete an object:
This will create a deletion marker, the object will still exist although not visible withlist-objects
.
Delete an Object
To delete an object, that is versioned, it is required to use the version-id
:
To delete the metadata of a soft deleted object, it is required to also delete the delete marker
.