Newbie in AWS Glacier - how to connect to my storage and upload files there via PowerShell?

0

Hi,

I'm a newbie with S3 and would like to know step by step how to connect, upload and read file(s) to my S3 Glacier storage via PowerShell? Link https://docs.aws.amazon.com/powershell/latest/reference/items/New-GLCVault.html looks very uninformative and convoluted regarding credentials to be used for connecting, and also has no samples to play with. Could anybody describe me step by step how to connect from my PowerShell console and do all the described steps for S3? AWSPowerShell.NetCore was installed on my Win machine, so cmdlets seem to be available. Thanks in advance!

已提問 4 個月前檢視次數 273 次
4 個答案
0

Ok, I tried to run New-S3Bucket cmd but got this error:

PS C:!> New-S3Bucket -BucketName website-example -Region us-west-2 New-S3Bucket : Access Denied At line:1 char:1

  • New-S3Bucket -BucketName website-example -Region us-west-2
  • CategoryInfo : InvalidOperation: (Amazon.PowerShe...wS3BucketCmdlet:NewS3BucketCmdlet) [New-S3Bucket], AmazonS3Exception
  • FullyQualifiedErrorId : Failed to create the specified bucket. Amazon S3 error: Access Denied,Amazon.PowerShell.Cmdlets.S3.NewS3BucketCmdlet

Write-S3Object led to the same error. What should I do to get these cmdlets working?

已回答 3 個月前
  • "Access denied" is the standout for me here: You don't appear to have permissions to do that.

0

@Brettski-AWS, could you please tell me where and how can I give the proper rights for using Write-S3Object? I granted my user FullAccessRight before , but it doesn't seem to work.

已回答 3 個月前
  • In IAM (in the AWS console) try assigning the AmazonS3FullAccess policy to your user. I'd caution that you should cut down the permissions the user has in a production environment. Note that if you're part of a larger AWS Organization your ability to perform certain tasks may be restricted by a Service Control Policy.

0
profile pictureAWS
專家
kentrad
已回答 4 個月前
0

While you can use Glacier in the way described in the other answer (and there's nothing wrong with that - it was how Glacier was originally designed to operate), Glacier can also be used as a storage class in S3 which can be simpler and takes away the need to handle vaults and so on - you just upload the objects you like and use the appropriate "storage class" parameter to tell S3 to put the files into Glacier.

If you are a newbie then I'd recommend going down the S3 storage class path because it is simpler and easier to deal with. Vaults still have their advantages but if you don't need to then go the other way.

profile pictureAWS
專家
已回答 4 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南