Skip to content

Instantly share code, notes, and snippets.

@j3tm0t0
Created August 21, 2012 09:11
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j3tm0t0/3413793 to your computer and use it in GitHub Desktop.
Save j3tm0t0/3413793 to your computer and use it in GitHub Desktop.
Upload a file to Glacier PowerShell script version
Add-Type -Path "C:\Program Files (x86)\AWS SDK for .NET\bin\AWSSDK.dll"
$region="ap-northeast-1"
$accesskey="ACCESSKEY"
$secretkey="SECRETKEY"
$vaultname="myvault"
$description="some binary file"
$file="c:\hoge\target.bin"
$endpoint = [Amazon.RegionEndpoint]::GetBySystemName($region)
$manager = New-Object -TypeName Amazon.Glacier.Transfer.ArchiveTransferManager($accesskey,$secretkey,$endpoint)
$manager.Upload($vaultname, $description, $file).ArchiveId
@justintjacob
Copy link

This is successfully working ,is possible to upload file with real file name instead of archive id ? because file listed in glacier as archive id.

once uploaded how to download a file from glacier ?please post script to download a file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment