在比较不同bucket中的2个json文件时,我使用了etag 为了比较。我将json文件加载到dynamodb中的表中 现在我想比较一下,数据是一样的。我可以选择吗 怎么办?这是我用来比较不同bucket之间的2个文件的方法。你知道吗
conn = client('s3') # again assumes boto.cfg setup, assume AWS S3
for key2 in conn.list_objects(Bucket='freedom-meital')['Contents']:
for key in conn.list_objects(Bucket='freedom-meital3')['Contents']:
if key['Key'] == key2['Key']:
if key['ETag'] != key2['ETag']:
print(key['Key']+" is not equal between the 2 buckets")
else:
print(key['Key']+" is equal between the 2 buckets")
目前没有回答
相关问题 更多 >
编程相关推荐