[英]AWS: How to transfer files from ec2 instance (Windows Server) to S3 daily?
Can someone explain me whats the best way to transfer data from a harddrive on an EC2 Instance (running Windows Server 2012) to an S3 Bucket for the same AWS Account on a daily basis?有人可以向我解释每天将数据从 EC2 实例(运行 Windows Server 2012)上的硬盘驱动器传输到同一 AWS 账户的 S3 存储桶的最佳方法是什么?
Backround idea to this: I'm generating a .csv file for one of our Business partners daily at 11:00 am and I want to deliver it to S3 (he has access to our S3 Bucket).对此的背景想法:我每天上午 11:00 为我们的一个业务合作伙伴生成一个 .csv 文件,我想将其交付给 S3(他可以访问我们的 S3 存储桶)。 After that he can pull it out of S3 manually or automatically whenever he wants.
之后,他可以随时手动或自动将其从 S3 中拉出。
Hope you can help me, I only found manually solutions with the CLI, but no automated way for daily transfers.希望你能帮助我,我只找到了 CLI 手动解决方案,但没有日常传输的自动化方式。
Best Regards此致
You can directly mount S3 buckets as mounted drives on your EC2 instances.您可以直接将 S3 存储桶挂载为 EC2 实例上的挂载驱动器。 This way you don't even need some sort of triggers/daily task scheduler along with third party service as objects would be directly available in the S3 bucket.
这样,您甚至不需要某种触发器/日常任务调度程序以及第三方服务,因为对象将直接在 S3 存储桶中可用。
For Linux typically you would use Filesystem in Userspace (FUSE).对于 Linux,您通常会使用用户空间中的文件系统 (FUSE)。 Take a look at this repo if you need it for Linux: https://github.com/s3fs-fuse/s3fs-fuse .
如果 Linux 需要它,请查看此 repo: https : //github.com/s3fs-fuse/s3fs-fuse 。
Regarding Windows, there is this tool: https://tntdrive.com/mount-amazon-s3-bucket.aspx关于 Windows,有这个工具: https : //tntdrive.com/mount-amazon-s3-bucket.aspx
If these tools don't suit you or if you don't want to mount directly the s3 bucket, here is another option: Whatever you can do with the CLI you should be able to do with the SDK.如果这些工具不适合您,或者您不想直接挂载 s3 存储桶,这里有另一种选择:无论您可以使用 CLI 做什么,您都应该可以使用 SDK 来做。 Therefore if you are able to code in one of the various language AWS Lambda proposes - C#/Java/Go/Powershell/Python/Node.js/Ruby - you could automate that using a Lambda function along with a daily task scheduler triggering at 11a.m.
因此,如果您能够使用 AWS Lambda 建议的各种语言之一进行编码 - C#/Java/Go/Powershell/Python/Node.js/Ruby - 您可以使用 Lambda 函数以及在 11a 触发的每日任务调度程序来自动执行该操作米
Hope this helps!希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.