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 ). 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 in the Amazon S3 User Guide .
PermissionsGeneral purpose bucket permissions - The
s3:GetObjectpermission is required to useGetPartfor unversioned objects or uploads. For versioned objects or uploads, thes3:GetObjectVersionpermission is required instead. For all requests to in-progress multipart uploads, thes3:GetIncompleteUploadpermission is also required. For more information, see Specifying permissions in a policy 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 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 .
GetPart is only supported for Amazon S3 general purpose buckets. It is not supported for Amazon S3 on Outposts , S3 directory buckets , and S3 Access Points .
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 instead.
The following operations are related to GetPart :
my file.txt , containing two spaces after my , you must URL encode this value to my%20%20file.txt .See also: AWS API Documentation
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]
--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 .
Note
Amazon S3 doesn’t support retrieving multiple ranges of data perGetPartrequest.
--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 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 code403 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
--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.
--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.
--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.
--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.
--help (boolean)
Display help for the command/subcommand.
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-CompleteMultipartUploadhas not been called. The part data exists, and can be overwritten by a subsequentUploadPartcall with the same part number.COMPLETED-CompleteMultipartUploadhas been called. The part data is immutable, and the full object exists.Possible values:
IN_PROGRESSCOMPLETED
ChecksumCRC32 -> (string)
The Base64 encoded, 32-bitCRC32checksum of the part. This checksum is only present if the checksum was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide .
ChecksumCRC32C -> (string)
The Base64 encoded, 32-bitCRC32Cchecksum of the part. This checksum is only present if the checksum was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide .
ChecksumCRC64NVME -> (string)
The Base64 encoded, 64-bitCRC64NVMEchecksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide .
ChecksumSHA1 -> (string)
The Base64 encoded, 160-bitSHA1digest of the part. This checksum is only present if the checksum was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide .
ChecksumSHA256 -> (string)
The Base64 encoded, 256-bitSHA256digest of the part. This checksum is only present if the checksum was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide .
ChecksumSHA512 -> (string)
The Base64 encoded, 512-bitSHA512digest of the part. For more information, see Checking object integrity in the Amazon S3 User Guide .
ChecksumMD5 -> (string)
The Base64 encoded, 128-bitMD5digest of the part. For more information, see Checking object integrity in the Amazon S3 User Guide .
ChecksumXXHASH64 -> (string)
The Base64 encoded, 64-bitXXHASH64checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide .
ChecksumXXHASH3 -> (string)
The Base64 encoded, 64-bitXXHASH3checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide .
ChecksumXXHASH128 -> (string)
The Base64 encoded, 128-bitXXHASH128checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide .
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:
AES256aws:fsxaws:backupaws:kmsaws: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,GetPartdoesn’t support theGLACIER,DEEP_ARCHIVE, orINTELLIGENT_TIERINGstorage classes.Possible values:
STANDARDREDUCED_REDUNDANCYSTANDARD_IAONEZONE_IAINTELLIGENT_TIERINGGLACIERDEEP_ARCHIVEOUTPOSTSGLACIER_IRSNOWEXPRESS_ONEZONEFSX_OPENZFSFSX_ONTAPAWS_BACKUP_WARMAWS_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 in the Amazon Simple Storage Service user guide .
Note
This functionality is not supported for directory buckets.Possible values:
requester