[英]How to access newly added file in S3 bucket using python
I am new to aws I access files in S3 using python I need to access newly added files in the bucket. 我是AWS新手,我使用python访问S3中的文件,我需要访问存储桶中新添加的文件。 Instead of accessing every data present in the bucket. 而不是访问存储桶中存在的每个数据。 Can anyone help me to reslove this issue?. 谁能帮助我解决这个问题? Thank you 谢谢
Take a look at S3 event notifications . 看一下S3 事件通知 。 You can have all new files be sent to an SQS queue and have your python program read from the queue to get new files. 您可以将所有新文件发送到SQS队列,并从队列中读取python程序以获取新文件。 There is not a way to query S3 for new files. 无法查询S3中的新文件。 Or if you could create a lambda function to operate on new files as well depending on what you need to do with new files. 或者,是否可以创建lambda函数来对新文件进行操作,具体取决于您需要对新文件执行的操作。
You can create a lambda with your business logic in python and finally you create an event in s3: 您可以在python中使用业务逻辑创建一个lambda,最后在s3中创建一个事件:
Important: You must have the lambda created. 重要提示:您必须创建lambda。
Diagram: 图解:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.