我们的亚马逊网络服务S3存储桶有10,000张图片,每个图片有5个标签,所以总共有50,000个标签,我们为此收费。
从亚马逊网络服务的documentation上看,它说:
region-TagStorage-TagHrs: The total of tags on all objects in the bucket reported by hour现在,我们想要削减成本,因此我们删除了每个图像上的所有5个标签,但我们仍然看到正在应用费用。有人知道如何理解这些指控吗?

发布于 2020-06-08 09:53:03
账单显示有更多带有标签的对象。
我找不到一种方法来轻松地列出所有带有标记的对象,所以这里有一个Python脚本,它将遍历一个区域中的所有存储桶和对象:
import boto3
REGION = 'ap-southeast-2'
s3_resource = boto3.resource('s3', region_name = REGION)
s3_client = boto3.client('s3', region_name = REGION)
for bucket in s3_resource.buckets.all():
print(bucket.name)
for object in bucket.objects.all():
response = s3_client.get_object_tagging(Bucket = bucket.name, Key = object.key)
for tag in response['TagSet']:
print('Tag found: ', tag['Key'], tag['Value'])s3https://stackoverflow.com/questions/62251691
复制相似问题