将数据附加到S3对象 [英] Append data to an S3 object

查看:106
本文介绍了将数据附加到S3对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一台想要写入存储在S3存储桶中的特定日志文件的机器.

Let's say that I have a machine that I want to be able to write to a certain log file stored on an S3 bucket.

因此,机器需要具有对该存储桶的写入功能,但是,我不希望它具有覆盖或删除该存储桶中的任何文件(包括我要写入的文件)的能力.

So, the machine needs to have writing abilities to that bucket, but, I don't want it to have the ability to overwrite or delete any files in that bucket (including the one I want it to write to).

因此,基本上,我希望我的机器只能将数据追加到该日志文件,而不覆盖它或下载它.

So basically, I want my machine to be able to only append data to that log file, without overriding it or downloading it.

有没有一种方法可以配置S3使其正常工作?也许有一些IAM策略可以附加到它上,这样它就可以像我想要的那样工作了?

Is there a way to configure my S3 to work like that? Maybe there's some IAM policy I can attach to it so it will work like I want?

推荐答案

不幸的是,你不能.

S3没有追加"操作. * 上传对象后,就无法对其进行修改.您唯一的选择是上传一个新对象来替换它,这不符合您的要求.

S3 doesn't have an "append" operation.* Once an object has been uploaded, there is no way to modify it in place; your only option is to upload a new object to replace it, which doesn't meet your requirements.

*:是的,我知道这篇文章已有两年历史了.不过,它仍然是准确的.

*: Yes, I know this post is a couple of years old. It's still accurate, though.

这篇关于将数据附加到S3对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆