小编kom*_*ali的帖子

如何将文件从s3服务下载到本地文件夹

我要求将文件从简单存储服务下载到本地文件夹,并计算本地文件夹中的no.of文件并检查简单存储服务,然后发送包含文件数量的邮件.

我试图从简单的存储服务下载文件,但我收到的错误就像get-s3object commandnotfoundexception.我该如何解决这个问题?

代码参考我已经采取

# Your account access key - must have read access to your S3 Bucket
$accessKey = "YOUR-ACCESS-KEY"
# Your account secret access key
$secretKey = "YOUR-SECRET-KEY"
# The region associated with your bucket e.g. eu-west-1, us-east-1 etc. (see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-regions)
$region = "eu-west-1"
# The name of your S3 Bucket
$bucket = "my-test-bucket"
# The folder in your bucket to copy, including trailing slash. Leave blank to copy the entire bucket
$keyPrefix = "my-folder/"
# …
Run Code Online (Sandbox Code Playgroud)

powershell amazon-s3 amazon-web-services aws-powershell

8
推荐指数
3
解决办法
2万
查看次数