Use CLI s3api to Retrieve Metadata of Amazon S3 Object
In Amazon S3 CLI, there are only a handful commands:
|
|
We can use cp
command to retrieve S3 object:
|
|
But if only the metadata of the object, such as ETag
or Content-Type
is needed, the S3 CLI does not have any command to do that.
Now enter S3API CLI. Not only the CLI commands can retrieve S3 objects, but also associated metadata. For example, retrieve S3 object similar to aws s3 cp
:
|
|
Just need the metadata of the object, use head-object
, which retrieves metadata without the object itself, as HTTP HEAD method: