Amazon S3 Console: Download Multiple Files at Once

When I go to the S3 console, I can’t upload several selected files (the web interface allows you to download only when one file is selected):

https://console.aws.amazon.com/s3

Is this something that can be changed in user policy or is it a limitation of Amazon?

+34
source share
11 answers

This is not possible through the web user interface. But this is a very simple task if you install the AWS CLI. You can check the installation and configuration steps when installing in the AWS Command Line Interface

After that go to cmd. A type:

aws s3 cp "S3 PATH" "LOCAL PATH" --recursive

. S3 .

+38

AWS CLI, exclude --include --recursive .

aws s3 cp s3://path/to/bucket/ . --recursive --exclude "*" --include "things_you_want"

.

--exclude "*" --include "*.txt"

.txt. - https://docs.aws.amazon.com/cli/latest/reference/s3/

+18

Actions-> , , ( 6 ).

Screen shot

+10

S3 (, ), ... S3 .

, , , .

+2

, - AWS, ( ) .

, , S3, http://s3browser.com/

+2

, Windows (tm), WinSCP . .

WinSCP SSH.

, , .

+1

CyberDuck. S3, .

0

, AWS s3 bucket. ,

# Script generates the version info file for all the 
# content under a particular bucket and then parses 
# the file to grab the versionId for each of the versions
# and finally generates a fully qualified http url for
# the different versioned files and use that to download 
# the content.

s3region="s3.ap-south-1.amazonaws.com"
bucket="your_bucket_name"
# note the location has no forward slash at beginning or at end
location="data/that/you/want/to/download"
# file names were like ABB-quarterly-results.csv, AVANTIFEED--quarterly-results.csv
fileNamePattern="-quarterly-results.csv"

# AWS CLI command to get version info
content="$(aws s3api list-object-versions --bucket $bucket --prefix "$location/")"
#save the file locally, if you want
echo "$content" >> version-info.json
versions=$(echo "$content" | grep -ir VersionId  | awk -F ":" '{gsub(/"/, "", $3);gsub(/,/, "", $3);gsub(/ /, "", $3);print $3 }')
for version in $versions
do
    echo ############### $fileId ###################
    #echo $version
    url="https://$s3region/$bucket/$location/$fileId$fileNamePattern?versionId=$version"
    echo $url
    content="$(curl -s "$url")"
    echo "$content" >> $fileId$fileNamePattern-$version.csv
    echo ############### $i ###################
done
0

- S3, Fillezilla Pro ( ). .

S3 , IAM. , .

0

Visual Studio AWS Explorer, Amazon S3 ( 1), ( 2), , ( 3), , . ( 4).

enter image description here

0
source

You can also use it --include "filename"many times in the same command, each time including different file names in double quotes, for example

aws s3 mycommand --include "file1" --include "file2"

This will save your time, and will not repeat the command to download one file at a time.

0
source

Source: https://habr.com/ru/post/1667367/


All Articles