

# GetPart

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 AWS Key Management Service (AWS KMS) keys (SSE-KMS), or dual-layer server-side encryption with AWS 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) 

**Important**  
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`.

## Request Syntax
<a name="API_GetPart_RequestSyntax"></a>

```
GET /{Key+}?part&partNumber={{PartNumber}}&uploadId={{UploadId}} HTTP/1.1
Host: {{Bucket}}.s3.amazonaws.com
Range: {{Range}}
x-amz-request-payer: {{RequestPayer}}
x-amz-expected-bucket-owner: {{ExpectedBucketOwner}}
x-amz-checksum-mode: {{ChecksumMode}}
```

## URI Request Parameters
<a name="API_GetPart_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Bucket](#API_GetPart_RequestSyntax) **   <a name="AmazonS3-GetPart-request-header-Bucket"></a>
The name of the bucket containing the part to retrieve.  
Required: Yes

 ** [Key](#API_GetPart_RequestSyntax) **   <a name="AmazonS3-GetPart-request-uri-uri-Key"></a>
Object key for which the multipart upload was initiated.  
Length Constraints: Minimum length of 1.  
Required: Yes

 ** [partNumber](#API_GetPart_RequestSyntax) **   <a name="AmazonS3-GetPart-request-uri-querystring-PartNumber"></a>
Part number of the part to retrieve. This is a positive integer between 1 and 10,000.  
Required: Yes

 ** [Range](#API_GetPart_RequestSyntax) **   <a name="AmazonS3-GetPart-request-header-Range"></a>
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).  
Amazon S3 doesn't support retrieving multiple ranges of data per `GetPart` request.

 ** [uploadId](#API_GetPart_RequestSyntax) **   <a name="AmazonS3-GetPart-request-uri-querystring-UploadId"></a>
Upload ID identifying the multipart upload to retrieve the specified part from.  
Required: Yes

 ** [x-amz-checksum-mode](#API_GetPart_RequestSyntax) **   <a name="AmazonS3-GetPart-request-header-ChecksumMode"></a>
To retrieve the checksum, this mode must be enabled.  
Valid Values: `ENABLED` 

 ** [x-amz-expected-bucket-owner](#API_GetPart_RequestSyntax) **   <a name="AmazonS3-GetPart-request-header-ExpectedBucketOwner"></a>
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).

 ** [x-amz-request-payer](#API_GetPart_RequestSyntax) **   <a name="AmazonS3-GetPart-request-header-RequestPayer"></a>
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*.  
This functionality is not supported for directory buckets.
Valid Values: `requester` 

## Request Body
<a name="API_GetPart_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_GetPart_ResponseSyntax"></a>

```
HTTP/1.1 200
accept-ranges: {{AcceptRanges}}
Content-Length: {{ContentLength}}
ETag: {{ETag}}
x-amz-multipart-upload-status: {{MultipartUploadStatus}}
x-amz-checksum-crc32: {{ChecksumCRC32}}
x-amz-checksum-crc32c: {{ChecksumCRC32C}}
x-amz-checksum-crc64nvme: {{ChecksumCRC64NVME}}
x-amz-checksum-sha1: {{ChecksumSHA1}}
x-amz-checksum-sha256: {{ChecksumSHA256}}
x-amz-checksum-sha512: {{ChecksumSHA512}}
x-amz-checksum-md5: {{ChecksumMD5}}
x-amz-checksum-xxhash64: {{ChecksumXXHASH64}}
x-amz-checksum-xxhash3: {{ChecksumXXHASH3}}
x-amz-checksum-xxhash128: {{ChecksumXXHASH128}}
x-amz-version-id: {{VersionId}}
Content-Range: {{ContentRange}}
x-amz-server-side-encryption: {{ServerSideEncryption}}
x-amz-server-side-encryption-aws-kms-key-id: {{SSEKMSKeyId}}
x-amz-server-side-encryption-bucket-key-enabled: {{BucketKeyEnabled}}
x-amz-storage-class: {{StorageClass}}
x-amz-request-charged: {{RequestCharged}}

{{Body}}
```

## Response Elements
<a name="API_GetPart_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers.

 ** [accept-ranges](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-AcceptRanges"></a>
Indicates that a range of bytes was specified in the request.

 ** [Content-Length](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ContentLength"></a>
The size of the retrieved part in bytes.

 ** [Content-Range](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ContentRange"></a>
The portion of the part that was returned in the response.

 ** [ETag](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ETag"></a>
The entity tag of the part.

 ** [x-amz-checksum-crc32](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ChecksumCRC32"></a>
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*.

 ** [x-amz-checksum-crc32c](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ChecksumCRC32C"></a>
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*.

 ** [x-amz-checksum-crc64nvme](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ChecksumCRC64NVME"></a>
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).

 ** [x-amz-checksum-md5](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ChecksumMD5"></a>
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).

 ** [x-amz-checksum-sha1](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ChecksumSHA1"></a>
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*.

 ** [x-amz-checksum-sha256](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ChecksumSHA256"></a>
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*.

 ** [x-amz-checksum-sha512](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ChecksumSHA512"></a>
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).

 ** [x-amz-checksum-xxhash128](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ChecksumXXHASH128"></a>
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).

 ** [x-amz-checksum-xxhash3](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ChecksumXXHASH3"></a>
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).

 ** [x-amz-checksum-xxhash64](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ChecksumXXHASH64"></a>
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).

 ** [x-amz-multipart-upload-status](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-MultipartUploadStatus"></a>
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.
Valid Values: `IN_PROGRESS | COMPLETED` 

 ** [x-amz-request-charged](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-RequestCharged"></a>
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*.  
This functionality is not supported for directory buckets.
Valid Values: `requester` 

 ** [x-amz-server-side-encryption](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-ServerSideEncryption"></a>
The server-side encryption algorithm used when storing this multipart upload in Amazon S3.  
Valid Values: `AES256 | aws:fsx | aws:backup | aws:kms | aws:kms:dsse` 

 ** [x-amz-server-side-encryption-aws-kms-key-id](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-SSEKMSKeyId"></a>
If present, indicates the ID of the KMS key that was used for object encryption.

 ** [x-amz-server-side-encryption-bucket-key-enabled](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-BucketKeyEnabled"></a>
Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with AWS Key Management Service (AWS KMS) keys (SSE-KMS).

 ** [x-amz-storage-class](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-StorageClass"></a>
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.  
For completed multipart uploads, `GetPart` doesn't support the `GLACIER`, `DEEP_ARCHIVE`, or `INTELLIGENT_TIERING` storage classes.
Valid 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` 

 ** [x-amz-version-id](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-header-VersionId"></a>
Version ID of the object.

The following data is returned in binary format by the service.

 ** [Body](#API_GetPart_ResponseSyntax) **   <a name="AmazonS3-GetPart-response-Body"></a>

## Errors
<a name="API_GetPart_Errors"></a>

 ** InvalidObjectState **   
Object is archived and inaccessible until restored. Use `GetObject` to retrieve once restored.  
If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you must first restore a copy using [RestoreObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html). Otherwise, this operation returns an `InvalidObjectState` error. For information about restoring archived objects, see [Restoring Archived Objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) in the *Amazon S3 User Guide*.  
HTTP Status Code: 403

 ** NoSuchBucket **   
The specified bucket does not exist.  
HTTP Status Code: 404

 ** NoSuchPart **   
The specified multipart upload part does not exist. Either the part has not been uploaded, or the part number exceeds the number of parts in the completed object.  
HTTP Status Code: 404

 ** NoSuchUpload **   
The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.  
HTTP Status Code: 404

## Examples
<a name="API_GetPart_Examples"></a>

### Sample Request
<a name="API_GetPart_Example_1"></a>

The following request retrieves part number `1` from the in-progress multipart upload identified by `uploadId` for the object `my-image.jpg`.

```
            GET /my-image.jpg?part&partNumber=1&uploadId=EXAMPLEJZ6e0YupT2h66iePQCc9IEbYbDUy4RTpMeoSMLPRp8Z5o1u8feSRonpvnWsKKG35tI2LB9VDPiCgTy.Gq2VxQLYjrue4Nq.NBdqI- HTTP/1.1
            Host: amzn-s3-demo-bucket.s3.<Region>.amazonaws.com
            Date: Mon, 3 Oct 2016 22:32:00 GMT
            Authorization: authorization string
```

### Sample Response: In-progress multipart upload
<a name="API_GetPart_Example_2"></a>

The response includes the `x-amz-multipart-upload-status` header indicating that the multipart upload has not yet been completed. The part data may be overwritten by a subsequent `UploadPart` call with the same part number.

```
            HTTP/1.1 200 OK
            x-amz-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2mkiDFu8yU9AS1ed4OpIszj7UDNEHGran
            x-amz-request-id: 318BC8BC148832E5
            Date: Mon, 3 Oct 2016 22:32:00 GMT
            ETag: "fba9dede5f27731c9771645a39863328"
            x-amz-multipart-upload-status: IN_PROGRESS
            x-amz-storage-class: STANDARD
            Content-Length: 5242880

           [5242880 bytes of part data]
```

### Sample Response: Completed multipart upload
<a name="API_GetPart_Example_3"></a>

After `CompleteMultipartUpload` has been called, the `x-amz-multipart-upload-status` header is set to `COMPLETED` and the part data is immutable.

```
            HTTP/1.1 200 OK
            x-amz-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2mkiDFu8yU9AS1ed4OpIszj7UDNEHGran
            x-amz-request-id: 318BC8BC148832E5
            Date: Mon, 3 Oct 2016 22:32:00 GMT
            ETag: "fba9dede5f27731c9771645a39863328"
            x-amz-multipart-upload-status: COMPLETED
            x-amz-storage-class: STANDARD
            Content-Length: 5242880

           [5242880 bytes of part data]
```

### Sample Request: Range header
<a name="API_GetPart_Example_4"></a>

The following request specifies the HTTP Range header to retrieve the first 10 bytes of part number `1`. 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.

```
            GET /my-image.jpg?part&partNumber=1&uploadId=EXAMPLEJZ6e0YupT2h66iePQCc9IEbYbDUy4RTpMeoSMLPRp8Z5o1u8feSRonpvnWsKKG35tI2LB9VDPiCgTy.Gq2VxQLYjrue4Nq.NBdqI- HTTP/1.1
            Host: amzn-s3-demo-bucket.s3.<Region>.amazonaws.com
            Date: Mon, 3 Oct 2016 22:32:00 GMT
            Range: bytes=0-9
            Authorization: authorization string
```

### Sample Response: Range header
<a name="API_GetPart_Example_5"></a>

The response returns HTTP `206 Partial Content` and includes the `Content-Range` header indicating the portion of the part that was returned.

```
            HTTP/1.1 206 Partial Content
            x-amz-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2mkiDFu8yU9AS1ed4OpIszj7UDNEHGran
            x-amz-request-id: 318BC8BC148832E5
            Date: Mon, 3 Oct 2016 22:32:00 GMT
            ETag: "fba9dede5f27731c9771645a39863328"
            x-amz-multipart-upload-status: IN_PROGRESS
            x-amz-storage-class: STANDARD
            Accept-Ranges: bytes
            Content-Range: bytes 0-9/5242880
            Content-Length: 10

           [10 bytes of part data]
```

## See Also
<a name="API_GetPart_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/s3-2006-03-01/GetPart) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/s3-2006-03-01/GetPart) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/s3-2006-03-01/GetPart) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/s3-2006-03-01/GetPart) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/s3-2006-03-01/GetPart) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/s3-2006-03-01/GetPart) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/s3-2006-03-01/GetPart) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/s3-2006-03-01/GetPart) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/s3-2006-03-01/GetPart) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/s3-2006-03-01/GetPart) 