

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Amazon DynamoDB 資料表的預估儲存成本
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table"></a>

*Moinul Al-Mamun，Amazon Web Services*

## 總結
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-summary"></a>

Amazon DynamoDB 是 NoSQL 交易資料庫，即使在 PB 規模下也能提供單一位數毫秒延遲。的這項熱門無伺服器產品 AWS 提供一致的效能和可擴展性。您不需要佈建儲存體，而且您的單一資料表最多可增長至 PB。 

DynamoDB 會在一個月內持續監控資料表的大小，以判斷您的儲存費用。 AWS 然後， 會針對以 GB 為單位的平均儲存大小向您收費。隨著時間的推移，資料表的成長越多，儲存成本的成長就越多。若要計算儲存成本，您可以使用 [AWS 定價計算器](https://calculator.aws/#/createCalculator/DynamoDB)，但您需要提供資料表的大致大小，包括全域次要索引 (GSIs)，這在專案開始時很難估計。此外， AWS 定價計算器不會考慮資料成長率。

此模式提供一種機制和可重複使用的 Microsoft Excel 範本，用於計算 DynamoDB 儲存體大小和成本。它會獨立考慮基礎資料表和 GSIs的儲存需求。它透過考慮個別項目的大小和隨時間推移的資料成長率來計算儲存體大小。 

若要取得預估值，請將兩個資訊插入範本：
+ 基底資料表和 GSIs 的個別項目大小，以 KB 為單位
+ 一個月平均可以新增多少個新物件或產品至資料表 （例如 1，000 萬個）

範本會產生未來三年的儲存體和成本預測圖表，如下列範例所示。

![\[成本的較低線會緩慢上移，而儲存體的較高線會更快上移。\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/images/pattern-img/9b74399d-9655-47ee-b9b3-de46b65bc4e3/images/c0436252-cc42-4ea3-ac50-c0455aece39d.png)


 

## 先決條件和限制
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-prereqs"></a>

**先決條件**
+ DynamoDB 的基本知識，包括 DynamoDB 儲存和定價
+ 了解 DynamoDB 中的資料、資料模型和項目大小
+ DynamoDB 全域次要索引 (GSIs的知識

**限制**
+ 範本提供您近似的計算，但不適用於所有組態。若要取得更準確的預估值，您必須測量基礎資料表和 GSIs 中每個項目的個別項目大小。 
+ 此模式僅支援根據固定資料成長假設來估計未來幾年的儲存大小和成本。

## 工具
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-tools"></a>

**AWS 服務**
+ [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) 是一項全受管 NoSQL 資料庫服務，可提供快速、可預期且可擴展的效能。

**其他工具**
+ [AWS 定價計算器](https://docs.aws.amazon.com/pricing-calculator/latest/userguide/what-is-pricing-calculator.html)是一種 Web 型規劃工具，可用來建立 AWS 使用案例的預估值。

## 史詩
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-epics"></a>

### 從 DynamoDB 資料模型擷取項目資訊
<a name="extract-item-information-from-your-ddb-data-model"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 取得項目大小。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/estimate-storage-costs-for-an-amazon-dynamodb-table.html) | 資料工程師 | 
| 取得一個月內新增的物件數量。 | 估計一個月平均會將多少個元件或物件新增至 DynamoDB 資料表。 | 資料工程師 | 

### 在 Excel 範本中輸入項目和物件資訊
<a name="enter-the-item-and-object-information-in-the-excel-template"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 下載並調整 Excel 試算表。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/estimate-storage-costs-for-an-amazon-dynamodb-table.html) | 資料工程師 | 
| 在 Excel 範本中輸入資訊。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/estimate-storage-costs-for-an-amazon-dynamodb-table.html) | 資料工程師 | 

## 相關資源
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-resources"></a>
+ Amazon DynamoDB [的隨需容量定價](https://aws.amazon.com/dynamodb/pricing/on-demand/) 
+ [AWS DynamoDB 定價計算器](https://calculator.aws/#/createCalculator/DynamoDB)

## 其他資訊
<a name="estimate-storage-costs-for-an-amazon-dynamodb-table-additional"></a>

請注意，連接的範本只會預測標準儲存資料表類別的儲存大小和成本。根據儲存成本的預測，以及考量個別項目大小和產品或物件成長率，您可以預估下列項目：
+ 資料匯出成本
+ 備份和復原成本
+ 資料儲存需求。

**Amazon DynamoDB 資料儲存成本**

DynamoDB 會持續監控資料表的大小，以判斷您的儲存費用。DynamoDB 會根據您啟用的功能，將資料的原始位元組大小與每個項目的儲存額外負荷相加，以計算可計費資料大小。如需詳細資訊，請參閱 [DynamoDB 開發人員指南](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/CapacityUnitCalculations.html)。 

資料儲存的價格取決於您的資料表類別。如果您使用 DynamoDB Standard 資料表類別，則每個月存放的前 25 GB 是免費的。如需不同標準和標準不常存取資料表類別儲存成本的詳細資訊 AWS 區域，請參閱[隨需容量定價](https://aws.amazon.com/dynamodb/pricing/on-demand/)。

## 附件
<a name="attachments-9b74399d-9655-47ee-b9b3-de46b65bc4e3"></a>

若要存取與本文件相關聯的其他內容，請解壓縮下列檔案： [attachment.zip](samples/p-attach/9b74399d-9655-47ee-b9b3-de46b65bc4e3/attachments/attachment.zip)