简体   繁体   English

如何从 s3 存储桶下载指定文件

[英]How can i download specified file from s3 bucket

I'm trying to download one file from my s3 bucket我正在尝试从我的 s3 存储桶中下载一个文件

I'm trying this command:我正在尝试这个命令:

aws s3 sync %inputS3path% %inputDatapath% --include "20211201-1500-euirluclprd01-olX8yf.1.gz"

and I habve also tried_我也试过_

aws s3 sync %inputS3path% %inputDatapath% --include "*20211201-1500-euirluclprd01-olX8yf.1*.gz"

but when command is executing, I'm get all file that's include folder但是当命令执行时,我得到了包含文件夹的所有文件

Folder looks like:文件夹看起来像:

/2021/12/05
20211201-1500-euirluclprd01-olX8yf.1.gz
20211201-1505-euirluclprd01-olX8yf.1.gz

You can use aws s3 cp to copy a specific file.您可以使用aws s3 cp复制特定文件。 For example:例如:

aws s3 cp s3://bucketname/path/file.gz .

Looking at your variables, you could probably use:查看您的变量,您可能可以使用:

aws s3 cp %inputS3path%/20211201-1500-euirluclprd01-olX8yf.1.gz %inputDatapath%

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM