gpt4 book ai didi

amazon-web-services - DynamoDB 是对表的读/写容量输入设置收费,还是仅对使用收费?

转载 作者:行者123 更新时间:2023-12-04 08:18:12 25 4
gpt4 key购买 nike

DynamoDB 是按我为表设置的读/写容量输入收费,还是仅在我使用它们时收费?

最佳答案

This page在文档中非常广泛地回答了您的问题。

写入容量单位仅用于写入和删除单个项目:

The following describes how DynamoDB write operations consume writecapacity units:

PutItem—writes a single item to a table. If an item with the sameprimary key exists in the table, the operation replaces the item. Forcalculating provisioned throughput consumption, the item size thatmatters is the larger of the two.

UpdateItem—modifies a single item inthe table. DynamoDB considers the size of the item as it appearsbefore and after the update. The provisioned throughput consumedreflects the larger of these item sizes.

DeleteItem—removes a single item from a table.The provisioned throughput consumption is based on the size of thedeleted item.

BatchWriteItem—writes up to 25 items to one or moretables. For example, if BatchWriteItemwrites a 500 byte item and a 3.5 KB item, DynamoDB will calculate thesize as 5 KB (1 KB + 4 KB), not 4 KB (500 bytes + 3.5 KB).

RCU 仅在您从表中读取元素时被消耗:

The following describes how DynamoDB read operations consume readcapacity units:

GetItem—reads a single item from a table. For example, if you read an item that is 3.5 KB, DynamoDB rounds theitem size to 4 KB. If you read an item of 10 KB, DynamoDB rounds theitem size to 12 KB.

BatchGetItem—reads up to 100 items, from one ormore tables. For example, if BatchGetItem reads a 1.5 KB item and a 6.5KB item, DynamoDB will calculate the size as 12 KB (4 KB + 8 KB), not8 KB (1.5 KB + 6.5 KB).

Query—reads multiple items that have the samepartition key value. For example, supposeyour query returns 10 items whose combined size is 40.8 KB. DynamoDBrounds the item size for the operation to 44 KB. If a query returns1500 items of 64 bytes each, the cumulative size is 96 KB.

Scan—readsall of the items in a table. DynamoDB considers the size of the itemsthat are evaluated, not the size of the items returned by the scan.

更新

说清楚。无论您使用多少已配置的 RCU/WCU,您都需要付费,但您不会将 RCU/WCU 用于表创建/删除。

关于amazon-web-services - DynamoDB 是对表的读/写容量输入设置收费,还是仅对使用收费?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45561241/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com