Downloading a file using an S3 access point
The following get-object
example command shows how you can
use the Amazon CLI to download a file through an access point. You must include an outfile, which
is a file name for the downloaded object.
The example requests the file
through the access point my-image.jpg
and saves the
downloaded file as my-openzfs-ap
.download.jpg
$
aws s3api get-object --key
my-image.jpg
--bucketmy-openzfs-ap-hrzrlukc5m36ft7okagglf3gmwluquse1b
-ext-s3aliasdownload.jpg
{ "AcceptRanges": "bytes", "LastModified": "Mon, 14 Oct 2024 17:01:48 GMT", "ContentLength": 141756, "ETag": "\"00751974dc146b76404bb7290f8f51bb\"", "ContentType": "binary/octet-stream", "ServerSideEncryption": "SSE_FSX", "Metadata": {}, "StorageClass": "FSX_OPENZFS" }
You can also use the REST API to download an object through an access point. For more information, see GetObject in the Amazon Simple Storage Service API Reference.