简体   繁体   English

AWS:如何每天将文件从 ec2 实例(Windows Server)传输到 S3?

[英]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!希望这可以帮助!

Create a small application that uploads your file to an S3 bucket (there are a some example here ).创建一个小的应用程序,上传您的文件到一个S3桶(也有一些例子在这里)。 Then use Task Scheduler to execute your application on a regular basis.然后使用 Task Scheduler 定期执行您的应用程序。

暂无
暂无

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

相关问题 如何在 AWS s3 和 AWS ec2 之间传输文件 - How to transfer files between AWS s3 and AWS ec2 aws 发送命令不将文件从 s3 存储桶复制到 windows 服务器 ec2 实例 - aws send command not copying file from s3 bucket to windows server ec2 instance 每当我向 s3 添加新文件时,如何将文件从 s3 传输到我的 ec2 实例? - How do I transfer files from s3 to my ec2 instance whenever I add a new file to s3? 如何使用 AWS Lambda 函数将文件从 S3 存储桶复制到 EC2 Windows 实例 - How to copy a file from S3 bucket to an EC2 Windows instance using AWS Lambda function 每天自动将批处理文件从 Linux EC2 实例传输到 Windows EC2 实例 - Automate batch file transfer daily from Linux EC2 Instance to a Windows EC2 Instance 使用php将文件从AWS s3预算传输到ec2实例 - transfer file from AWS s3 budget to ec2 instance using php 挂载 S3 存储桶或将文件从 S3 存储桶复制到 Windows EC2 实例哪个更好? - What is better Mounting S3 bucket or copying files from S3 bucket to windows EC2 instance? 使用 aws s3 cp(本地)将数据从我的 S3 存储桶移动到我的 EC2 实例是否会产生数据传输费用? - Will there be data transfer fees using aws s3 cp (locally) to move data from my S3 bucket to my EC2 instance? 使用 SMB 将文件从 Windows 服务器传输到 AWS S3 - Transfer files from Windows Server to AWS S3 using SMB 如何通过AWS EC2将DataFrame从Pycharm传输到AWS S3? - How to transfer DataFrames from Pycharm through AWS EC2 to AWS S3?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM