简体   繁体   English

如何将数据从Amazon S3传输到Amazon EC2

[英]How to transfer data from Amazon S3 to Amazon EC2

I am using an EC2 instance and I have enabled the log service of Elastic Load Balancer. 我正在使用EC2实例,并且已启用Elastic Load Balancer的日志服务。 The logs are stored in Amazon S3 and I want that data to be used as dataset for Elasticsearch which is present on my EC2 instance. 日志存储在Amazon S3中,我希望该数据用作EC2实例上存在的Elasticsearch数据集。 Is there a way I can transfer the data to my EC2 instance or access the data directly from S3 only to be used for Elasticsearch ? 有什么方法可以将数据传输到EC2实例或直接从S3访问数据(仅用于Elasticsearch)?

The AWS Command Line Interface (CLI) has commands that make it easy to copy to/from Amazon S3. AWS命令行界面(CLI)具有使您可以轻松复制到Amazon S3或从Amazon S3复制命令的命令。

You can run them on your EC2 instance to download data from Amazon S3. 您可以在EC2实例上运行它们,以从Amazon S3下载数据。

aws s3 cp s3://bucket/path/file .
aws s3 cp s3://bucket/path . --recursive
aws s3 sync s3://bucket/path .

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

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