Ir para o conteúdo

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?

feita há 2 anos627 visualizações
2 Respostas
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
ESPECIALISTA
respondido há 2 anos
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

ESPECIALISTA
respondido há 2 anos
ESPECIALISTA
avaliado há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.