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 following code examples show how to use S3 Glacier with an AWS software development kit (SDK).
Actions are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.
Scenarios are code examples that show you how to accomplish specific tasks by calling multiple functions within a service or combined with other AWS services.
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.
Get started
The following code example shows how to get started using Amazon S3 Glacier.
.NET
AWS SDK for .NET
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the
AWS Code
Examples Repository.
using Amazon.Glacier;
using Amazon.Glacier.Model;
namespaceGlacierActions;
publicstaticclassHelloGlacier{staticasync Task Main(){var glacierService = new AmazonGlacierClient();
Console.WriteLine("Hello Amazon Glacier!");
Console.WriteLine("Let's list your Glacier vaults:");
// You can use await and any of the async methods to get a response.// Let's get the vaults using a paginator.var glacierVaultPaginator = glacierService.Paginators.ListVaults(
new ListVaultsRequest { AccountId = "-" });
awaitforeach (var vault in glacierVaultPaginator.VaultList)
{
Console.WriteLine($"{vault.CreationDate}:{vault.VaultName}, ARN:{vault.VaultARN}");
}
}
}
For API details, see
ListVaults
in AWS SDK for .NET API Reference.
Hello Amazon S3 Glacier
The following code example shows how to get started using Amazon S3 Glacier.
.NET
AWS SDK for .NET
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the
AWS Code
Examples Repository.
using Amazon.Glacier;
using Amazon.Glacier.Model;
namespaceGlacierActions;
publicstaticclassHelloGlacier{staticasync Task Main(){var glacierService = new AmazonGlacierClient();
Console.WriteLine("Hello Amazon Glacier!");
Console.WriteLine("Let's list your Glacier vaults:");
// You can use await and any of the async methods to get a response.// Let's get the vaults using a paginator.var glacierVaultPaginator = glacierService.Paginators.ListVaults(
new ListVaultsRequest { AccountId = "-" });
awaitforeach (var vault in glacierVaultPaginator.VaultList)
{
Console.WriteLine($"{vault.CreationDate}:{vault.VaultName}, ARN:{vault.VaultARN}");
}
}
}
For API details, see
ListVaults
in AWS SDK for .NET API Reference.
There's more on GitHub. Find the complete example and learn how to set up and run in the
AWS Code
Examples Repository.
using Amazon.Glacier;
using Amazon.Glacier.Model;
namespaceGlacierActions;
publicstaticclassHelloGlacier{staticasync Task Main(){var glacierService = new AmazonGlacierClient();
Console.WriteLine("Hello Amazon Glacier!");
Console.WriteLine("Let's list your Glacier vaults:");
// You can use await and any of the async methods to get a response.// Let's get the vaults using a paginator.var glacierVaultPaginator = glacierService.Paginators.ListVaults(
new ListVaultsRequest { AccountId = "-" });
awaitforeach (var vault in glacierVaultPaginator.VaultList)
{
Console.WriteLine($"{vault.CreationDate}:{vault.VaultName}, ARN:{vault.VaultARN}");
}
}
}
For API details, see
ListVaults
in AWS SDK for .NET API Reference.