本文介绍了AWS Lambda用于将对象移动到冰川的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在开发一个POC,我在S3上设置了一个生命周期规则,在没有几天之后将对象移动到冰川(如果对象有指定的标记)。规则对我来说很好,对象通过生命周期规则被移动到冰川,存储类型从标准变为Glacier。 (到目前为止一直很好)。I am working on a POC where I have setup a Lifecycle rule on S3 to move objects to glacier after certain no of days (if objects have specified tag). Rule is working fine for me, objects are getting moved to glacier by lifecycle rule and storage type is change to Glacier from Standard. (so far so good).由于我需要限制用户从我的应用程序中使用该文件(存档文件),我正在寻找获取通知的方法(当对象实际移动到冰川时,通过SQS)或调用Lambda函数(调用我的应用程序REST端点)。As I need to restrict user to use that file (archived file) from my application, I am looking for a way to get notification (either through SQS) or invoke Lambda function (to call my application REST endpoint) when object is actually moved to glacier.我在这里检查了S3支持的事件通知类型( http://docs.aws.amazon .com / AmazonS3 / latest / dev / NotificationHowTo.html#supported-notification-event-types )但它没有任何存储更改或对象被移动到冰川。I have checked S3 supported event notification types here(http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#supported-notification-event-types) but it doesn't have any for storage change or object being moved to glacier.让我知道是否有任何方法可以配置此方法或任何其他方法来实现此行为。Let me know if there is any way to configure this or any other approach I can use to achieve this behavior.问候。推荐答案您不会收到通过生命周期规则从S3移动到Glacier的对象的Lambda通知秒。You will not receive Lambda notifications for objects moved from S3 to Glacier via the Lifecycle rules.当S3对象移动到Glacier时,该对象不会从S3中删除。相反,它的存储类型只是从标准/ RR / IA更改为Glacier。并且没有存储类型更改的通知类型。When an S3 object is moved to Glacier, the object is not removed from S3. Instead, it's storage type is simply changed from Standard/RR/IA to "Glacier". And there is no notification type for storage type changes.此外,AWS文档声明:Also, the AWS documentation states: 您不会收到来自生命周期策略或失败操作的自动删除的事件通知。 You will not receive event notifications from automatic deletes from lifecycle policies or from failed operations.来源: http:// docs .aws.amazon.com / AmazonS3 / latest / dev / NotificationHowTo.html#notification-how-to-event-types-and-destinations 这篇关于AWS Lambda用于将对象移动到冰川的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-07 05:20