Created
August 21, 2012 09:11
-
-
Save j3tm0t0/3413793 to your computer and use it in GitHub Desktop.
Upload a file to Glacier PowerShell script version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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