Direkt zum Inhalt

is there a way to download multiple files from s3 bucket nodejs. specific files not all files in s3 bucket

0

is there a way to download multiple files from s3 bucket nodejs. specific files not all files in s3 bucket?

gefragt vor 2 Jahren630 Aufrufe
2 Antworten
1

Did you consider using "include" and "exclude" filters while using s3 sync or cp CLI. I assume, your nodejs specific files would certain defined prefix or suffix.

You can try something like this:

               aws s3 sync s3://bucketname/ . --exclude "*" --include "nodejs_files_pattern*"

Let me know if that doesn't help. Happy to assist further.

Abhishek

AWS
EXPERTE
beantwortet vor 2 Jahren
1

Hello,

It is possible to download the specific files with prefix and suffix. In your case you have requirement to download only .js extension files so follow this CLI Command to get the files.

aws s3 cp s3://your-bucket-name/path/to/your/folder . --recursive --exclude "*" --include "*.js"

Replace your bucket name and your directory path to filter files in your bucket.

Thank You

EXPERTE
beantwortet vor 2 Jahren
EXPERTE
überprüft vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.