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

标签 amazon-web-services amazon-dynamodb

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

最佳答案

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

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

The following describes how DynamoDB write operations consume write capacity units:

PutItem—writes a single item to a table. If an item with the same primary key exists in the table, the operation replaces the item. For calculating provisioned throughput consumption, the item size that matters is the larger of the two.

UpdateItem—modifies a single item in the table. DynamoDB considers the size of the item as it appears before and after the update. The provisioned throughput consumed reflects the larger of these item sizes.

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

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

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

The following describes how DynamoDB read operations consume read capacity units:

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

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

Query—reads multiple items that have the same partition key value. For example, suppose your query returns 10 items whose combined size is 40.8 KB. DynamoDB rounds the item size for the operation to 44 KB. If a query returns 1500 items of 64 bytes each, the cumulative size is 96 KB.

Scan—reads all of the items in a table. DynamoDB considers the size of the items that 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/

相关文章:

python - 为什么 Elastic Beanstalk 不更新?

amazon-web-services - AWSCli dynamodb update-item 命令语法

amazon-web-services - 使用自定义资源 Lambda 运行爬网程序

arrays - DynamoDB : UpdateExpression for updating arrays

php - DynamoDB 计数分组依据

amazon-web-services - 为什么 S3 的大写存储桶名称在 US-EAST 允许使用,但在其他区域不允许使用?

java - ubuntu aws 中的网站 apache-tomcat 无法正常工作

node.js - AWS Elastic Beanstalk : Loading local module causes errors

amazon-web-services - DynamoDB "set"值是 CDRT 吗?

amazon-web-services - 如何在 Amazon Linux 实例上安装 Railo?