如果通过GUI上传到S3,则BOTO3 API不会返回列表中的新文件
我在Python上有一组BOTO3驱动的命令。他们似乎很棒,可以从S3下载文件。
bucket = s3_client.Bucket(bucket_name)
for obj in bucket.objects.filter(Prefix=key_dir):
# Iterate over all files to download
问题是,我现在已经测试了通过GUI手动上传文件到同一存储桶和前缀区域。.我可以看到文件列出,它的大小为非零置...所有这些都从GUI上载好了..但是,
当我重复上面的API调用...所有相同的旧文件都会回来了。但是我的全新文件从列表中省略了..
我需要破坏缓存或其他内容吗?默认情况下,AWS Boto3库似乎只看到长期的文件。
I have a set of boto3 powered commands in python. they seem to be working great to download files from S3.
bucket = s3_client.Bucket(bucket_name)
for obj in bucket.objects.filter(Prefix=key_dir):
# Iterate over all files to download
The trouble is, I've now tested uploading a file manually via the GUI to this same bucket and prefix area.. I can see the file is listing, it is of a non-zero size... all uploaded well from the GUI.. BUT
When I repeat the API calls like above... all the same older files come back just fine.. but my brand new file is omitted from the list..
Do I need to bust a cache or something? Seems the AWS Boto3 library by default is only seeing long lived files..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这种行为似乎与2018年制造的水桶孤立。因此,我计划忽略它并创建一个新的水桶。.一旦我有了一个新的水桶,这种行为完全停止了..奇怪的是,希望它可以帮助其他可能看到这一点的人
The behavior seems isolated to a bucket made in 2018.. so I plan to just ignore this and create a new bucket.. once I had a new bucket this behavior stopped altogether.. strange, but hope it helps others who might see this