There are more AWS SDK examples available in the AWS Doc SDK Examples
Use UploadMultipartPart
with an AWS SDK or CLI
The following code examples show how to use UploadMultipartPart
.
- AWS CLI
-
The following command uploads the first 1 MiB (1024 x 1024 bytes) part of an archive:
aws glacier upload-multipart-part --body
part1
--range 'bytes 0-1048575/*
'-
-account-id - --vault-namemy-vault
--upload-id19gaRezEXAMPLES6Ry5YYdqthHOC_kGRCT03L9yetr220UmPtBYKk-OssZtLqyFu7sY1_lR7vgFuJV6NtcV5zpsJ
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account.
The body parameter takes a path to a part file on the local filesystem. The range parameter takes an HTTP content range indicating the bytes that the part occupies in the completed archive. The upload ID is returned by the
aws glacier initiate-multipart-upload
command and can also be obtained by usingaws glacier list-multipart-uploads
.For more information on multipart uploads to Amazon Glacier using the AWS CLI, see Using Amazon Glacier in the AWS CLI User Guide.
-
For API details, see UploadMultipartPart
in AWS CLI Command Reference.
-