How to download files from s3 service to local folder

前端 未结 3 2203
南方客
南方客 2021-02-20 16:02

I have requirement to download files from simple storage service to local folder and count the no.of files in local folder and check against simple storage service then send mai

3条回答
  •  一个人的身影
    2021-02-20 16:05

    Similar to Will's example, if you want to download the whole content of a "folder" keeping the directory structure try:

    Get-S3Object -BucketName "my-bucket" -KeyPrefix "path/to/directory" | Read-S3Object -Folder .
    

    MS doc at https://docs.aws.amazon.com/powershell/latest/reference/items/Read-S3Object.html provides examples with fancier filtering.

提交回复
热议问题