We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.
If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”
Customize cookie preferences
We use cookies and similar tools (collectively, "cookies") for the following purposes.
Essential
Essential cookies are necessary to provide our site and services and cannot be deactivated. They are usually set in response to your actions on the site, such as setting your privacy preferences, signing in, or filling in forms.
Performance
Performance cookies provide anonymous statistics about how customers navigate our site so we can improve site experience and performance. Approved third parties may perform analytics on our behalf, but they cannot use the data for their own purposes.
Allowed
Functional
Functional cookies help us provide useful site features, remember your preferences, and display relevant content. Approved third parties may set these cookies to provide certain site features. If you do not allow these cookies, then some or all of these services may not function properly.
Allowed
Advertising
Advertising cookies may be set through our site by us or our advertising partners and help us deliver relevant marketing content. If you do not allow these cookies, you will experience less relevant advertising.
Allowed
Blocking some types of cookies may impact your experience of our sites. You may review and change your choices at any time by selecting Cookie preferences in the footer of this site. We and selected third-parties use cookies or similar technologies as specified in the AWS Cookie Notice.
Unable to save cookie preferences
We will only store essential cookies at this time, because we were unable to save your cookie preferences.
If you want to change your cookie preferences, try again later using the link in the AWS console footer, or contact support if the problem persists.
This page is only for existing customers of the S3 Glacier service using Vaults and the original REST API from 2012.
If you're looking for archival storage solutions we suggest using the S3 Glacier storage classes in Amazon S3, S3 Glacier Instant Retrieval, S3 Glacier Flexible Retrieval, and S3 Glacier Deep Archive. To learn more about these storage options, see S3 Glacier storage classes and
Long-term data storage using S3 Glacier storage classes in the Amazon S3 User
Guide. These storage classes use the Amazon S3 API, are available in all regions, and can be managed within the Amazon S3 console. They offer features like Storage Cost Analysis, Storage Lens, advanced optional encryption features, and more.
This page is only for existing customers of the S3 Glacier service using Vaults and the original REST API from 2012.
If you're looking for archival storage solutions we suggest using the S3 Glacier storage classes in Amazon S3, S3 Glacier Instant Retrieval, S3 Glacier Flexible Retrieval, and S3 Glacier Deep Archive. To learn more about these storage options, see S3 Glacier storage classes and
Long-term data storage using S3 Glacier storage classes in the Amazon S3 User
Guide. These storage classes use the Amazon S3 API, are available in all regions, and can be managed within the Amazon S3 console. They offer features like Storage Cost Analysis, Storage Lens, advanced optional encryption features, and more.
The job ID can be found in the output of aws glacier initiate-job and aws glacier list-jobs.
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account.
For API details, see
DescribeJob
in AWS CLI Command Reference.
PowerShell
Tools for PowerShell
Example 1: Returns details of the specified job. When the job completes successfully the Read-GCJobOutput cmdlet can be used to retrieve the contents of the job (an archive or inventory list) to the local file system.
For API details, see
DescribeJob
in AWS Tools for PowerShell Cmdlet Reference.
Python
SDK for Python (Boto3)
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the
AWS Code
Examples Repository.
classGlacierWrapper:"""Encapsulates Amazon S3 Glacier API operations."""def__init__(self, glacier_resource):"""
:param glacier_resource: A Boto3 Amazon S3 Glacier resource.
"""
self.glacier_resource = glacier_resource
@staticmethoddefget_job_status(job):"""
Gets the status of a job.
:param job: The job to query.
:return: The current status of the job.
"""try:
job.load()
logger.info(
"Job %s is performing action %s and has status %s.",
job.id,
job.action,
job.status_code,
)
except ClientError:
logger.exception("Couldn't get status for job %s.", job.id)
raiseelse:
return job.status_code
For API details, see
DescribeJob
in AWS SDK for Python (Boto3) API Reference.
The job ID can be found in the output of aws glacier initiate-job and aws glacier list-jobs.
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account.
For API details, see
DescribeJob
in AWS CLI Command Reference.
For a complete list of AWS SDK developer guides and code examples, see
Using S3 Glacier with an AWS SDK.
This topic also includes information about getting started and details about previous SDK versions.
Did this page help you? - Yes
Thanks for letting us know we're doing a good job!
If you've got a moment, please tell us what we did right so we can do more of it.
Did this page help you? - No
Thanks for letting us know this page needs work. We're sorry we let you down.
If you've got a moment, please tell us how we can make the documentation better.