

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

# 使用 AWS SDKs DynamoDB 程式碼範例
<a name="service_code_examples"></a>

下列程式碼範例示範如何搭配 AWS 軟體開發套件 (SDK) 使用 DynamoDB。

*基本概念*是程式碼範例，這些範例說明如何在服務內執行基本操作。

*Actions* 是大型程式的程式碼摘錄，必須在內容中執行。雖然動作會告訴您如何呼叫個別服務函數，但您可以在其相關情境中查看內容中的動作。

*案例*是向您展示如何呼叫服務中的多個函數或與其他 AWS 服務組合來完成特定任務的程式碼範例。

*AWS 社群貢獻*是由多個團隊所建立和維護的範例 AWS。若要提供意見回饋，請使用連結儲存庫中提供的機制。

如需 AWS SDK 開發人員指南和程式碼範例的完整清單，請參閱 [搭配 AWS SDK 使用 DynamoDB](sdk-general-information-section.md)。此主題也包含有關入門的資訊和舊版 SDK 的詳細資訊。

**Contents**
+ [基本概念](service_code_examples_basics.md)
  + [Hello DynamoDB](example_dynamodb_Hello_section.md)
  + [了解基本概念](example_dynamodb_Scenario_GettingStartedMovies_section.md)
  + [動作](service_code_examples_actions.md)
    + [`BatchExecuteStatement`](example_dynamodb_BatchExecuteStatement_section.md)
    + [`BatchGetItem`](example_dynamodb_BatchGetItem_section.md)
    + [`BatchWriteItem`](example_dynamodb_BatchWriteItem_section.md)
    + [`CreateTable`](example_dynamodb_CreateTable_section.md)
    + [`DeleteItem`](example_dynamodb_DeleteItem_section.md)
    + [`DeleteTable`](example_dynamodb_DeleteTable_section.md)
    + [`DescribeTable`](example_dynamodb_DescribeTable_section.md)
    + [`DescribeTimeToLive`](example_dynamodb_DescribeTimeToLive_section.md)
    + [`ExecuteStatement`](example_dynamodb_ExecuteStatement_section.md)
    + [`GetItem`](example_dynamodb_GetItem_section.md)
    + [`ListTables`](example_dynamodb_ListTables_section.md)
    + [`PutItem`](example_dynamodb_PutItem_section.md)
    + [`Query`](example_dynamodb_Query_section.md)
    + [`Scan`](example_dynamodb_Scan_section.md)
    + [`UpdateItem`](example_dynamodb_UpdateItem_section.md)
    + [`UpdateTable`](example_dynamodb_UpdateTable_section.md)
    + [`UpdateTimeToLive`](example_dynamodb_UpdateTimeToLive_section.md)
+ [案例](service_code_examples_scenarios.md)
  + [使用 DAX 加速讀取](example_dynamodb_Usage_DaxDemo_section.md)
  + [進階全域次要索引案例](example_dynamodb_Scenario_GSIAdvanced_section.md)
  + [建置應用程式以將資料提交至 DynamoDB 資料表](example_cross_SubmitDataApp_section.md)
  + [比較多個值與單一屬性](example_dynamodb_Scenario_CompareMultipleValues_section.md)
  + [有條件地更新項目的 TTL](example_dynamodb_UpdateItemConditionalTTL_section.md)
  + [連線至本機執行個體](example_dynamodb_local_section.md)
  + [計數表達式運算子](example_dynamodb_Scenario_ExpressionOperatorCounting_section.md)
  + [建立 REST API 以追蹤 COVID-19 資料](example_cross_ApiGatewayDataTracker_section.md)
  + [建立傳訊應用程式](example_cross_StepFunctionsMessenger_section.md)
  + [建立無伺服器應用程式來管理相片](example_cross_PAM_section.md)
  + [建立具有全域次要索引的資料表](example_dynamodb_CreateTableWithGlobalSecondaryIndex_section.md)
  + [建立啟用暖輸送量的資料表](example_dynamodb_CreateTableWarmThroughput_section.md)
  + [建立 Web 應用程式以追蹤 DynamoDB 資料](example_cross_DynamoDBDataTracker_section.md)
  + [建立 websocket 聊天應用程式](example_cross_ApiGatewayWebsocketChat_section.md)
  + [建立具有 TTL 的項目](example_dynamodb_PutItemTTL_section.md)
  + [建立和管理 MRSC 全域資料表](example_dynamodb_Scenario_MRSCGlobalTables_section.md)
  + [建立和管理示範 MREC 的全域資料表](example_dynamodb_Scenario_GlobalTableOperations_section.md)
  + [使用 PartiQL DELETE 刪除資料](example_dynamodb_PartiQLDelete_section.md)
  + [偵測映像中的 PPE](example_cross_RekognitionPhotoAnalyzerPPE_section.md)
  + [使用 PartiQL INSERT 插入資料](example_dynamodb_PartiQLInsert_section.md)
  + [從瀏覽器調用 Lambda 函式](example_cross_LambdaForBrowser_section.md)
  + [管理全域次要索引](example_dynamodb_Scenario_GSILifecycle_section.md)
  + [管理資源型政策](example_dynamodb_Scenario_ResourcePolicyLifecycle_section.md)
  + [監控 DynamoDB 效能](example_cross_MonitorDynamoDB_section.md)
  + [執行進階查詢操作](example_dynamodb_Scenario_AdvancedQueryTechniques_section.md)
  + [執行清單操作](example_dynamodb_Scenario_ListOperations_section.md)
  + [執行映射操作](example_dynamodb_Scenario_MapOperations_section.md)
  + [執行集合操作](example_dynamodb_Scenario_SetOperations_section.md)
  + [使用多批 PartiQL 陳述式查詢資料表](example_dynamodb_Scenario_PartiQLBatch_section.md)
  + [使用 PartiQL 查詢資料表](example_dynamodb_Scenario_PartiQLSingle_section.md)
  + [使用全域次要索引查詢資料表](example_dynamodb_Scenarios_QueryWithGlobalSecondaryIndex_section.md)
  + [使用 begins\_with 條件查詢資料表](example_dynamodb_Scenarios_QueryWithBeginsWithCondition_section.md)
  + [使用日期範圍查詢資料表](example_dynamodb_Scenarios_QueryWithDateRange_section.md)
  + [使用複雜篩選條件表達式查詢資料表](example_dynamodb_Scenarios_QueryWithComplexFilter_section.md)
  + [使用動態篩選條件表達式查詢資料表](example_dynamodb_Scenarios_QueryWithDynamicFilter_section.md)
  + [使用篩選條件表達式和限制查詢資料表](example_dynamodb_Scenarios_QueryWithFilterAndLimit_section.md)
  + [查詢具有巢狀屬性的資料表](example_dynamodb_Scenarios_QueryWithNestedAttributes_section.md)
  + [查詢具有分頁的資料表](example_dynamodb_Scenarios_QueryWithPagination_section.md)
  + [查詢具有高度一致性讀取的資料表](example_dynamodb_Scenarios_QueryWithStronglyConsistentReads_section.md)
  + [使用 PartiQL SELECT 查詢資料](example_dynamodb_PartiQLSelect_section.md)
  + [查詢 TTL 項目](example_dynamodb_QueryFilteredTTL_section.md)
  + [使用日期和時間模式查詢資料表](example_dynamodb_Scenario_DateTimeQueries_section.md)
  + [儲存 EXIF 和其他映像資訊](example_cross_DetectLabels_section.md)
  + [設定屬性型存取控制](example_dynamodb_Scenario_ABACSetup_section.md)
  + [了解更新表達式順序](example_dynamodb_Scenario_UpdateExpressionOrder_section.md)
  + [更新資料表的暖輸送量設定](example_dynamodb_UpdateTableWarmThroughput_section.md)
  + [更新項目的 TTL](example_dynamodb_UpdateItemTTL_section.md)
  + [使用 PartiQL UPDATE 更新資料](example_dynamodb_PartiQLUpdate_section.md)
  + [使用 API Gateway 來調用 Lambda 函式](example_cross_LambdaAPIGateway_section.md)
  + [使用 Step Functions 調用 Lambda 函式](example_cross_ServerlessWorkflows_section.md)
  + [使用文件模型](example_dynamodb_MidLevelInterface_section.md)
  + [使用高階物件持久性模型](example_dynamodb_HighLevelInterface_section.md)
  + [使用原子計數器操作](example_dynamodb_Scenario_AtomicCounterOperations_section.md)
  + [使用條件式操作](example_dynamodb_Scenario_ConditionalOperations_section.md)
  + [使用表達式屬性名稱](example_dynamodb_Scenario_ExpressionAttributeNames_section.md)
  + [使用排程事件來調用 Lambda 函式](example_cross_LambdaScheduledEvents_section.md)
  + [使用本機次要索引](example_dynamodb_Scenario_LSIExamples_section.md)
  + [使用串流和存留時間](example_dynamodb_Scenario_StreamsAndTTL_section.md)
  + [使用全域資料表和多區域複寫最終一致性 (MREC)](example_dynamodb_Scenario_MultiRegionReplication_section.md)
  + [使用資源標記](example_dynamodb_Scenario_TaggingExamples_section.md)
  + [使用資料表加密](example_dynamodb_Scenario_EncryptionExamples_section.md)
+ [無伺服器範例](service_code_examples_serverless_examples.md)
  + [使用 DynamoDB 觸發條件調用 Lambda 函式](example_serverless_DynamoDB_Lambda_section.md)
  + [使用 DynamoDB 觸發條件報告 Lambda 函式的批次項目失敗](example_serverless_DynamoDB_Lambda_batch_item_failures_section.md)
+ [AWS 社群貢獻](service_code_examples_aws_community_contributions.md)
  + [建置和測試無伺服器應用程式](example_tributary-lite_serverless-application_section.md)