简体   繁体   English

AWS S3:如何检索存储桶活动?

[英]AWS S3: How to retrieve bucket activities?

I have a project based on Nest.js, TypeScript, and Kubernetes.我有一个基于 Nest.js、TypeScript 和 Kubernetes 的项目。

In my project, I need to handle updates in the AWS S3 bucket, like Publishing of new files, Updating files, and Deleting as well, and do something with that information.在我的项目中,我需要处理 AWS S3 存储桶中的更新,例如发布新文件、更新文件和删除,并对这些信息进行处理。

I know about the streams, which can trigger the Lambda functions on S3 bucket events(PutObject, Update, Delete, and so on).我知道流,它可以触发 S3 存储桶事件(PutObject、更新、删除等)上的 Lambda 函数。 I want to find a way, to implement the same thing without lambda functions if it is possible.我想找到一种方法,如果可能的话,在没有 lambda 功能的情况下实现同样的事情。

As an alternative way, that logic can be implemented by the Cron job, which should get the objects from the bucket, and process them.作为一种替代方式,该逻辑可以由 Cron 作业实现,它应该从存储桶中获取对象并处理它们。 But for that case, I need to compare data to define what is happened.但是对于那种情况,我需要比较数据来定义发生了什么。

I also think about the case to have Lambda functions, which should handle the S3 bucket streams, and send the request to the needed APIs.我还考虑有 Lambda 函数的情况,它应该处理 S3 存储桶流,并将请求发送到所需的 API。

So, is anybody faced with the same case?那么,有人面临同样的情况吗? If so, how do you solved it?如果是这样,你是如何解决的? Is it possible to have an S3 webhook directly to API, if so how?是否可以将 S3 webhook 直接连接到 API,如果可以,如何?

I will be grateful for the suggestions!我将不胜感激的建议!

Thanks!谢谢!

After the research, I found that it can be done using the MinIO经过研究,我发现使用MinIO可以做到

It is a good way to implement it with the RabbitMQ, and handle events from the AWS S3 Bucket这是使用 RabbitMQ 实现它并处理来自 AWS S3 存储桶的事件的好方法

Here are some useful guidelines以下是一些有用的指南

https://docs.min.io/docs/minio-bucket-notification-guide.html https://docs.min.io/docs/minio-bucket-notification-guide.html

http://nm-muzi.com/docs/minio-bucket-notification-guide.htmlhttp://nm-muzi.com/docs/minio-bucket-notification-guide.html

MinIO in DockerHub DockerHub 中的 MinIO

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

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