<a id="cli-aws-s3api-get-part"></a>

# get-part

## Description

Retrieves a single part of an in-progress or completed multipart upload.

Before retrieving any part corresponding to an upload ID, a multipart upload must be initiated (see [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) ). In response to the initiate request, S3 returns an upload ID, a unique identifier that must be included in the `GetPart` request.

Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being created.

The `GetPart` request must specify the full key name for the object. To retrieve a specific range of bytes from a part, use the `Range` header to specify the byte range (for example, `bytes=0-9` ).

Both the virtual-hosted-style requests and the path-style requests are supported. For a virtual hosted-style request example, the object `photos/2006/February/sample.jpg` is specified as `/photos/2006/February/sample.jpg` . For a path-style request example, the object `photos/2006/February/sample.jpg` in the bucket named `examplebucket` is specified as `/examplebucket/photos/2006/February/sample.jpg` . For more information about request types, see [HTTP Host Header Bucket Specification](https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket) in the *Amazon S3 User Guide* .

> > Permissions

> **General purpose bucket permissions** - The `s3:GetObject` permission is required to use `GetPart` for unversioned objects or uploads. For versioned objects or uploads, the `s3:GetObjectVersion` permission is required instead. For all requests to in-progress multipart uploads, the `s3:GetIncompleteUpload` permission is also required. For more information, see [Specifying permissions in a policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) in the *Amazon S3 User Guide* .

> > Storage classes

For completed multipart uploads, `GetPart` does not support retrieving a part from an object that is stored in the S3 Glacier Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, or the S3 Intelligent-Tiering storage class. Such requests will return an `InvalidObjectState` error. Restoring is not supported for `GetPart` . For more information about storage classes, see [Using Amazon S3 storage classes](https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html) in the *Amazon S3 User Guide* .

> Encryption

Encryption request headers, like `x-amz-server-side-encryption` , should not be sent for the `GetPart` requests, if your object uses server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your `GetPart` requests for the object that uses these types of keys, you’ll get an HTTP `400 Bad Request` error.

Server-side encryption with customer-provided keys (SSE-C) is not supported for `GetPart` .

#### NOTE
`GetPart` is only supported for Amazon S3 general purpose buckets. It is not supported for [Amazon S3 on Outposts](https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) , [S3 directory buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html) , and [S3 Access Points](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html) .

`GetPart` is only supported for multipart uploads that were initiated after November 29, 2026, 00:00 UTC. `GetPart` is also not supported for multipart uploads completed with non-consecutive part numbers. Use [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) instead.

The following operations are related to `GetPart` :

* [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
* [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
* [CompleteMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
* [AbortMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
* [ListParts](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
* [ListMultipartUploads](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)

#### WARNING
You must URL encode any signed header values that contain spaces. For example, if your header value is `my file.txt` , containing two spaces after `my` , you must URL encode this value to `my%20%20file.txt` .

See also: [AWS API Documentation](https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPart)

## Synopsis

```
  get-part
--bucket <value>
--key <value>
[--range <value>]
[--request-payer <value>]
--upload-id <value>
--part-number <value>
[--expected-bucket-owner <value>]
[--checksum-mode <value>]
<outfile>
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]
```

## Options

`--bucket` (string) [required]

> The name of the bucket containing the part to retrieve.

`--key` (string) [required]

> Object key for which the multipart upload was initiated.

> Constraints:

> * min: `1`

`--range` (string)

> Downloads the specified byte range of a part. For more information about the HTTP Range header, see [https://www.rfc-editor.org/rfc/rfc9110.html#name-range](https://www.rfc-editor.org/rfc/rfc9110.html#name-range) .

> #### NOTE
> Amazon S3 doesn’t support retrieving multiple ranges of data per `GetPart` request.

`--request-payer` (string)

> Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see [Downloading Objects in Requester Pays Buckets](https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the *Amazon S3 User Guide* .

> #### NOTE
> This functionality is not supported for directory buckets.

> Possible values:

> * `requester`

`--upload-id` (string) [required]

> Upload ID identifying the multipart upload to retrieve the specified part from.

`--part-number` (integer) [required]

> Part number of the part to retrieve. This is a positive integer between 1 and 10,000.

`--expected-bucket-owner` (string)

> The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code `403 Forbidden` (access denied).

`--checksum-mode` (string)

> To retrieve the checksum, this mode must be enabled.

> Possible values:

> * `ENABLED`

`outfile` (string) [required]
Filename where the content will be saved

## Global Options

`--debug` (boolean)

Turn on debug logging.

`--endpoint-url` (string)

Override command’s default URL with the given URL.

`--no-verify-ssl` (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

`--no-paginate` (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

`--output` (string)

The formatting style for command output.

* json
* text
* table
* yaml
* yaml-stream
* off

`--query` (string)

A JMESPath query to use in filtering the response data.

`--profile` (string)

Use a specific profile from your credential file.

`--region` (string)

The region to use. Overrides config/env settings.

`--version` (string)

Display the version of this tool.

`--color` (string)

Turn on/off color output.

* on
* off
* auto

`--no-sign-request` (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

`--ca-bundle` (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

`--cli-read-timeout` (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

`--cli-connect-timeout` (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

`--cli-binary-format` (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob `fileb://` will always be treated as binary and use the file contents directly regardless of the `cli-binary-format` setting. When using `file://` the file contents will need to properly formatted for the configured `cli-binary-format`.

* base64
* raw-in-base64-out

`--no-cli-pager` (boolean)

Disable cli pager for output.

`--cli-auto-prompt` (boolean)

Automatically prompt for CLI input parameters.

`--no-cli-auto-prompt` (boolean)

Disable automatically prompt for CLI input parameters.

`--cli-error-format` (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

* legacy
* json
* yaml
* text
* table
* enhanced

`--help` (boolean)

Display help for the command/subcommand.

## Output

Body -> (streaming blob)

> Part data.

AcceptRanges -> (string)

> Indicates that a range of bytes was specified in the request.

ContentLength -> (long)

> The size of the retrieved part in bytes.

ETag -> (string)

> The entity tag of the part.

MultipartUploadStatus -> (string)

> The status of the multipart upload. Possible values are:

> * `IN_PROGRESS` - `CompleteMultipartUpload` has not been called. The part data exists, and can be overwritten by a subsequent `UploadPart` call with the same part number.
> * `COMPLETED` - `CompleteMultipartUpload` has been called. The part data is immutable, and the full object exists.

> Possible values:

> * `IN_PROGRESS`
> * `COMPLETED`

ChecksumCRC32 -> (string)

> The Base64 encoded, 32-bit `CRC32` checksum of the part. This checksum is only present if the checksum was uploaded with the object. For more information, see [Checking object integrity](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) in the *Amazon S3 User Guide* .

ChecksumCRC32C -> (string)

> The Base64 encoded, 32-bit `CRC32C` checksum of the part. This checksum is only present if the checksum was uploaded with the object. For more information, see [Checking object integrity](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) in the *Amazon S3 User Guide* .

ChecksumCRC64NVME -> (string)

> The Base64 encoded, 64-bit `CRC64NVME` checksum of the part. For more information, see [Checking object integrity in the Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) .

ChecksumSHA1 -> (string)

> The Base64 encoded, 160-bit `SHA1` digest of the part. This checksum is only present if the checksum was uploaded with the object. For more information, see [Checking object integrity](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) in the *Amazon S3 User Guide* .

ChecksumSHA256 -> (string)

> The Base64 encoded, 256-bit `SHA256` digest of the part. This checksum is only present if the checksum was uploaded with the object. For more information, see [Checking object integrity](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) in the *Amazon S3 User Guide* .

ChecksumSHA512 -> (string)

> The Base64 encoded, 512-bit `SHA512` digest of the part. For more information, see [Checking object integrity in the Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) .

ChecksumMD5 -> (string)

> The Base64 encoded, 128-bit `MD5` digest of the part. For more information, see [Checking object integrity in the Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) .

ChecksumXXHASH64 -> (string)

> The Base64 encoded, 64-bit `XXHASH64` checksum of the part. For more information, see [Checking object integrity in the Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) .

ChecksumXXHASH3 -> (string)

> The Base64 encoded, 64-bit `XXHASH3` checksum of the part. For more information, see [Checking object integrity in the Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) .

ChecksumXXHASH128 -> (string)

> The Base64 encoded, 128-bit `XXHASH128` checksum of the part. For more information, see [Checking object integrity in the Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) .

VersionId -> (string)

> Version ID of the object.

ContentRange -> (string)

> The portion of the part that was returned in the response.

ServerSideEncryption -> (string)

> The server-side encryption algorithm used when storing this multipart upload in Amazon S3.

> Possible values:

> * `AES256`
> * `aws:fsx`
> * `aws:backup`
> * `aws:kms`
> * `aws:kms:dsse`

SSEKMSKeyId -> (string)

> If present, indicates the ID of the KMS key that was used for object encryption.

BucketKeyEnabled -> (boolean)

> Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).

StorageClass -> (string)

> Provides storage class information about where this part is stored.

> For in-progress multipart uploads, this header can return any of the valid values listed for this header.

> #### NOTE
> For completed multipart uploads, `GetPart` doesn’t support the `GLACIER` , `DEEP_ARCHIVE` , or `INTELLIGENT_TIERING` storage classes.

> Possible values:

> * `STANDARD`
> * `REDUCED_REDUNDANCY`
> * `STANDARD_IA`
> * `ONEZONE_IA`
> * `INTELLIGENT_TIERING`
> * `GLACIER`
> * `DEEP_ARCHIVE`
> * `OUTPOSTS`
> * `GLACIER_IR`
> * `SNOW`
> * `EXPRESS_ONEZONE`
> * `FSX_OPENZFS`
> * `FSX_ONTAP`
> * `AWS_BACKUP_WARM`
> * `AWS_BACKUP_LOW_COST_WARM`

RequestCharged -> (string)

> If present, indicates that the requester was successfully charged for the request. For more information, see [Using Requester Pays buckets for storage transfers and usage](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) in the *Amazon Simple Storage Service user guide* .

> #### NOTE
> This functionality is not supported for directory buckets.

> Possible values:

> * `requester`
