Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon s3 Powershell:使用临时凭据访问AWS s3存储桶_Amazon S3_Powershell 2.0 - Fatal编程技术网

Amazon s3 Powershell:使用临时凭据访问AWS s3存储桶

Amazon s3 Powershell:使用临时凭据访问AWS s3存储桶,amazon-s3,powershell-2.0,Amazon S3,Powershell 2.0,我想先创建临时凭据,然后为该用户担任角色。使用这个临时凭证,我想访问s3存储桶来对它们执行一些操作。但当我尝试使用临时accessKey和secretKey访问bucket时,其抛出的execption(如AWS访问密钥Id)在我们的记录中并不存在。 请帮我解决 附言:我对powershell(使用v2.0)是新手 获取异常,例如: "Exception calling "ListBuckets" with "0" argument(s): "The AWS Access Key Id you

我想先创建临时凭据,然后为该用户担任角色。使用这个临时凭证,我想访问s3存储桶来对它们执行一些操作。但当我尝试使用临时accessKey和secretKey访问bucket时,其抛出的execption(如AWS访问密钥Id)在我们的记录中并不存在。 请帮我解决

附言:我对powershell(使用v2.0)是新手

获取异常,例如:

"Exception calling "ListBuckets" with "0" argument(s): "The AWS Access Key Id you provided does not exist in our records." At C:\Users\Desktop\Get_s3_bucket_objects.ps1:91 char:20 + $client.ListBuckets <<<< ()
+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException

“使用“0”参数调用“ListBucket”时出现异常:”您提供的AWS访问密钥Id在我们的记录中不存在。“在C:\Users\Desktop\Get_s3_bucket_objects.ps1:91 char:20+$client.listbackes中,我在R中使用aws.s3包时遇到了类似的错误。当我从aws复制访问密钥ID和密钥并将它们粘贴到代码中时,发现我拾取了额外的非文本字符

$secretKey =$ini[$profile]["secret"]
$accessKey =$ini[$profile]["key"]

我重新键入了第一个和最后几个字母以及引号,很好。使用R中的aws.s3包时,我遇到了类似的错误。当我从aws复制访问密钥ID和密钥,并将它们粘贴到代码中这些行中的位置时,我发现我拾取了额外的非文本字符

$secretKey =$ini[$profile]["secret"]
$accessKey =$ini[$profile]["key"]
我重新输入了第一封和最后几封信以及引文,很好