

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

# Amazon Aurora 教學課程和範本程式碼
<a name="CHAP_Tutorials"></a>

 AWS 文件包含數個教學課程，引導您完成常見的 Amazon Aurora 使用案例。其中許多教學課程會示範如何將 Amazon Aurora 與其他 AWS 服務搭配使用。此外，您可以在中存取範本程式碼。

**注意**  
您可以在 [AWS 資料庫部落格](https://aws.amazon.com/blogs/database/)找到更多教學課程。如需培訓的詳細資訊，請參閱 [AWS 培訓與認證](https://www.aws.training/)。

**Topics**
+ [本指南中的教學課程](#CHAP_Tutorials.ThisGuide)
+ [其他 AWS 指南中的教學課程](#CHAP_Tutorials.OtherGuides)
+ [GitHub 中的教學課程和範本程式碼](#CHAP_Tutorials.GitHub)
+ [AWS 資料庫技術指南](#aws-db-cookbook-overview)
+ [AWS Amazon Aurora PostgreSQL 的研討會和實驗室內容入口網站](#CHAP_Tutorials_postgreslabs)
+ [AWS Amazon Aurora MySQL 的研討會和實驗室內容入口網站](#CHAP_Tutorials_sqllabs)
+ [搭配 AWS SDK 使用此服務](#sdk-general-information-section)

## 本指南中的教學課程
<a name="CHAP_Tutorials.ThisGuide"></a>

本指南中的以下教學課程會向您展示如何使用 Amazon Aurora 執行常見的任務。
+ [教學課程：建立要與資料庫叢集搭配使用的 VPC (僅限 IPv4)](CHAP_Tutorials.WebServerDB.CreateVPC.md)

  了解如何在以 Amazon VPC 服務為基礎的虛擬私有雲端 (VPC) 中包括資料庫叢集。在此情況下，VPC 會與在相同 VPC 的 Amazon EC2 執行個體上執行的 Web 伺服器共用資料。
+ [教學課程：建立要與資料庫叢集搭配使用的 (VPC)(雙堆疊模式)](CHAP_Tutorials.CreateVPCDualStack.md)

  了解如何在以 Amazon VPC 服務為基礎的虛擬私有雲端 (VPC) 中包括資料庫叢集。在此情況下，VPC 會與相同 VPC 中的 Amazon EC2 執行個體共用資料。於本教學課程中，您將為此案例建立與以雙堆疊模式執行之資料庫搭配使用的 VPC。
+ [教學：建立 Web 伺服器和 Amazon Aurora 資料庫叢集](TUT_WebAppWithRDS.md)

  了解如何安裝支援 PHP 的 Apache Web 伺服器，並建立 MySQL 資料庫。Web 伺服器在使用 Amazon Linux 的 Amazon EC2 執行個體上執行，而 MySQL 資料庫是 ，Aurora MySQL 資料庫叢集。Amazon EC2 執行個體和資料庫叢集皆在 Amazon VPC 中執行。
+ [教學：從資料庫叢集快照還原 Amazon Aurora 資料庫叢集](tut-restore-cluster.md)

  了解如何使用從資料庫叢集快照還原資料庫叢集。
+ [教學︰使用標籤指定要停止哪些 Aurora 資料庫叢集](Tagging.Aurora.Autostop.md)

  了解如何使用標籤指定要停止哪些 Aurora 資料庫叢集。
+ [教學課程：使用 Amazon EventBridge 來記錄資料庫執行個體狀態變更](rds-cloud-watch-events.md#log-rds-instance-state)

  了解如何使用 Amazon EventBridge 和 記錄資料庫執行個體狀態變更 AWS Lambda。

## 其他 AWS 指南中的教學課程
<a name="CHAP_Tutorials.OtherGuides"></a>

其他 AWS 指南中的下列教學課程說明如何使用 Amazon Aurora 執行常見任務：

**注意**  
一些教學課程使用了 Amazon RDS 資料庫執行個體，但它們可以適應使用 Aurora 資料庫叢集。
+ *AWS AppSync 開發人員指南*中的[教學課程：Aurora Serverless](https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-rds-resolvers.html)

  了解如何使用 AWS AppSync 為已啟用資料 API Aurora Serverless 的資料庫叢集提供執行 SQL 命令的資料來源。您可以使用 AWS AppSync 解析程式，使用 GraphQL 查詢、變動和訂閱針對 Data API 執行 SQL 陳述式。
+ *AWS Secrets Manager 《 使用者指南*》中的[教學課程：輪換 AWS 資料庫的秘密](https://docs.aws.amazon.com/secretsmanager/latest/userguide/tutorials_db-rotate.html) 

  了解如何建立 AWS 資料庫的秘密，並設定秘密以排程輪換。手動觸發一個輪換，然後確認秘密新版本持續提供存取。
+ *AWS Elastic Beanstalk 開發人員指南*中的[教學課程和範例](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/tutorials.html)

  了解如何部署使用 Amazon RDS 資料庫的應用程式 AWS Elastic Beanstalk。
+ 在 *Amazon Machine Learning Developer Guide* 中[使用 Amazon RDS 資料庫中的資料建立 Amazon ML 資料來源](https://docs.aws.amazon.com/machine-learning/latest/dg/using-amazon-rds-with-amazon-ml.html)

  了解如何從存放在 MySQL 資料庫執行個體的資料中建立 Amazon Machine Learning (Amazon ML) 資料來源物件。
+ 《[Amazon Quick 使用者指南》中的在 VPC 中手動啟用對 Amazon RDS 執行個體的存取](https://docs.aws.amazon.com/quicksight/latest/user/rds-vpc-access.html) **

  了解如何在 VPC 中啟用 Amazon RDS 資料庫執行個體的快速存取。

## GitHub 中的教學課程和範本程式碼
<a name="CHAP_Tutorials.GitHub"></a>

GitHub 中的以下教學課程和範本程式碼會向您展示如何使用 Amazon Aurora 執行常見的任務：
+ [建立 Aurora Serverless v2 出借圖書館](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/cross_service/aurora_rest_lending_library)

  了解如何建立出借圖書館應用程式，讓顧客可以借書與還書。此範例使用 Aurora Serverless v2和 適用於 Python (Boto3) 的 AWS SDK。
+ [使用查詢的 Spring REST API 建立 Amazon Aurora 項目追蹤應用程式，以使用 SDK for Java 2.x 查詢 Aurora Serverless v2 的資料](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javav2/usecases/Creating_Spring_RDS_Rest)

  了解如何建立一個查詢 Aurora Serverless v2 資料的 Spring REST API。它是供使用 SDK for Java 2.x 的 React 應用程式使用。
+ [ 建立使用 查詢Aurora Serverless v2資料的 Amazon Aurora 項目追蹤器應用程式 適用於 PHP 的 AWS SDK](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/php/cross_service/aurora_item_tracker)

  了解如何建立一個使用資料 API 的 `RdsDataClient` 和 Aurora Serverless v2 追蹤和報告工作項目的應用程式。此範例使用 適用於 PHP 的 AWS SDK。
+ [建立 Amazon Aurora 項目追蹤器應用程式來查詢使用 適用於 Python (Boto3) 的 AWS SDK查詢Aurora Serverless v2資料](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/cross_service/aurora_item_tracker)

  了解如何建立一個使用資料 API 的 `RdsDataClient` 和 Aurora Serverless v2 追蹤和報告工作項目的應用程式。此範例使用 適用於 Python (Boto3) 的 AWS SDK。

## AWS 資料庫技術指南
<a name="aws-db-cookbook-overview"></a>

[AWS 資料庫技術指南](https://github.com/aws-samples/sample-aws-database-cookbook/)是全方位的資料庫指南，說明如何建置、部署和管理高效能、符合成本效益的資料庫解決方案 AWS。逐步教學課程會引導您建立生產就緒的應用程式，以及使用 CloudFormation 範本部署應用程式。您將在建置基礎設施、實作聯網、開發無伺服器架構、管理資料庫和整合生成式 AI 時學習基本 AWS 服務。了解 AWS 最佳實務，協助您建立安全、可擴展的解決方案，同時最佳化成本。無論您是初次接觸 AWS 還是經驗豐富的專業人員， AWS 資料庫技術指南都可協助您開發技能，以解決常見的資料庫挑戰並實作企業就緒的解決方案。技術指南包含下列章節：
+ **[AWS 開始使用適用於 資料庫應用程式的 ](https://github.com/aws-samples/sample-aws-database-cookbook/tree/main/1_Getting_Started_with_AWS)**- 了解如何設定您的帳戶和 Jupyter 筆記本環境等 AWS 基本概念。
+ **[資料庫基礎知識](https://github.com/aws-samples/sample-aws-database-cookbook/tree/main/2_Your_First_Database_on_AWS)** – 探索基本資料庫概念並比較 AWS 資料庫服務，為您的工作負載選擇正確的解決方案。
+ **[使用 Amazon Aurora 的無伺服器 Web 應用程式](https://github.com/aws-samples/sample-aws-database-cookbook/tree/main/3_Building_Your_First_Serverless_Web_App_with_Aurora)**：使用 Amazon Aurora PostgreSQL 建置端對端零售應用程式，以處理庫存、訂單和客戶資料。
+ **[監控和可觀測性](https://github.com/aws-samples/sample-aws-database-cookbook/tree/main/4_Operational_Excellence_Best_Practices_for_Aurora)**：設定效能追蹤和設定警示，以在潛在資料庫問題影響應用程式之前加以識別。
+ **[使用 Amazon Aurora 進行擴展](https://github.com/aws-samples/sample-aws-database-cookbook/tree/main/5_Scaling_for_Success_Growing_with_Aurora)**：了解如何使用 Aurora DSQL 建置彈性多區域部署，以及如何擴展資料庫以增加處理能力，或跨多個執行個體擴展以增加容量。
+ **[最佳化效能和成本](https://github.com/aws-samples/sample-aws-database-cookbook/tree/main/6_Optimizing_Performance_and_Cost)**：使用經驗證的調校策略最佳化資料庫效能與降低成本。
+ **[前往 AWS 專用資料庫的旅程](https://github.com/aws-samples/sample-aws-database-cookbook/tree/main/7_Break_Free_from_Everything_in_One_Database_Trap_A_Journey_to_Purpose_Built_AWS_Databases)** – 建立安全可靠的基礎設施，將生成式 AI 解決方案和資料驅動型應用程式從原型擴展到企業部署。
+ **[使用 RAG 的 GenAI 應用程式](https://github.com/aws-samples/sample-aws-database-cookbook/tree/main/8_Building_Your_First_GenAI_Application_with_AWS_Data_Foundations)**：為保險和醫療保健文件建置智慧搜尋系統，此系統會使用檢索增強生成 (RAG) 來提供準確、內容感知的結果。

## AWS Amazon Aurora PostgreSQL 的研討會和實驗室內容入口網站
<a name="CHAP_Tutorials_postgreslabs"></a>

以下精選的研討會和其他實作內容可協助您了解 Amazon Aurora PostgreSQL 的特性和功能：
+ [ 手動建立新的 Aurora 叢集 ](https://catalog.workshops.aws/apgimmday/en-US/1-prereq/create-aurora-cluster)

  了解如何手動建立 Amazon Aurora PostgreSQL 叢集。
+ [ 設定 Cloud9 和初始化資料庫 ](https://catalog.workshops.aws/apgimmday/en-US/1-prereq/cloud9-client)

  了解如何設定 Cloud9 和初始化 PostgreSQL 資料庫。
+ [快速複製](https://catalog.workshops.aws/apgimmday/en-US/manageability/fast-cloning)

  了解如何建立 Aurora 快速複製。
+ [查詢計畫管理](https://catalog.workshops.aws/apgimmday/en-US/performance-and-scalability/query-plan-mgmt)

  了解如何使用查詢計畫管理來控制一組陳述式的執行計畫。
+ [叢集快取管理](https://catalog.workshops.aws/apgimmday/en-US/high-availability-and-durability/cluster-cache-mgmt)

  了解 Aurora PostgreSQL 中的叢集快取功能。
+ [ 資料庫活動串流 ](https://catalog.workshops.aws/apgimmday/en-US/monitoring-and-security/db-activity-stream)

  了解如何使用此功能監控與稽核資料庫活動。
+ [使用績效詳情](https://catalog.workshops.aws/apgimmday/en-US/monitoring-and-security/perf-insights)

  了解如何使用績效詳情來監控和調整資料庫執行個體。
+ [使用 RDS 工具進行效能監控](https://catalog.us-east-1.prod.workshops.aws/workshops/31babd91-aa9a-4415-8ebf-ce0a6556a216/en-US)

  了解如何使用 AWS 和 Postgres 工具 (Cloudwatch、增強型監控、慢查詢日誌、績效詳情、PostgreSQL 目錄檢視） 來了解效能問題，並找出改善資料庫效能的方法。
+ [自動擴展僅供讀取複本](https://catalog.workshops.aws/apgimmday/en-US/performance-and-scalability/load-data-auto-scale)

  了解 Aurora 僅供讀取複本自動擴展在使用負載產生器指令碼時實際上如何運作。
+ [測試容錯](https://catalog.workshops.aws/apgimmday/en-US/high-availability-and-durability/fault-tolerance)

  了解資料庫叢集如何容忍失敗。
+ [Aurora 全球資料庫](https://catalog.workshops.aws/apgimmday/en-US/high-availability-and-durability/aurora-global-db)

  了解 Aurora 全球資料庫。
+ [使用機器學習](https://catalog.workshops.aws/apgimmday/en-US/generative-ai/aurora-pg-ml)

  了解 Aurora Machine Learning。
+ [Aurora Serverless v2](https://catalog.workshops.aws/apgimmday/en-US/performance-and-scalability/aurora-serverless-v2)

  了解 Aurora Serverless v2。
+ [適用於 Aurora PostgreSQL 的受信任語言延伸模組](https://catalog.workshops.aws/apgimmday/en-US/developer-productivity/trustedlanguageextension)

  了解如何建置可在 Aurora PostgreSQL 上安全執行的高效能延伸模組。

## AWS Amazon Aurora MySQL 的研討會和實驗室內容入口網站
<a name="CHAP_Tutorials_sqllabs"></a>

以下精選的研討會和其他實作內容可協助您了解 Amazon Aurora MySQL 的特性和功能：
+ [建立 Aurora 叢集](https://catalog.workshops.aws/awsauroramysql/en-US/provisioned/create/)

  了解如何手動建立 Amazon Aurora MySQL 叢集。
+ [建立 Cloud9 雲端型 IDE 環境以連線到您的資料庫](https://catalog.workshops.aws/awsauroramysql/en-US/prereqs/connect)

  了解如何設定 Cloud9 和初始化 MySQL 資料庫。
+ [快速複製](https://catalog.workshops.aws/awsauroramysql/en-US/provisioned/clone/)

  了解如何建立 Aurora 快速複製。
+ [恢復叢集](https://catalog.workshops.aws/awsauroramysql/en-US/provisioned/backtrack/)

  了解如何恢復資料庫叢集。
+ [使用績效詳情](https://catalog.workshops.aws/awsauroramysql/en-US/provisioned/pi/)

  了解如何使用績效詳情來監控和調整資料庫執行個體。
+ [使用 RDS 工具進行效能監控](https://catalog.workshops.aws/awsauroramysql/en-US/provisioned/perfobserve/)

  了解如何使用 AWS 和 SQL 工具來了解效能問題，並找出改善資料庫效能的方法。
+ [分析查詢效能](https://catalog.workshops.aws/awsauroramysql/en-US/provisioned/perfanalyze/)

  了解如何使用不同的工具，針對與 SQL 效能相關的問題進行疑難排解。
+ [自動擴展僅供讀取複本](https://catalog.workshops.aws/awsauroramysql/en-US/provisioned/autoscale/)

  了解自動擴展僅供讀取複本的運作方式。
+ [測試容錯](https://catalog.workshops.aws/awsauroramysql/en-US/provisioned/ft/)

  了解 Aurora MySQL 中的高可用性和容錯功能。
+ [Aurora 全球資料庫](https://catalog.workshops.aws/awsauroramysql/en-US/global)

  了解 Aurora 全球資料庫。
+ [Aurora Serverless v2](https://catalog.workshops.aws/awsauroramysql/en-US/sv2)

  了解 Aurora Serverless v2。
+ [使用機器學習](https://catalog.workshops.aws/awsauroramysql/en-US/ml)

  了解 Aurora Machine Learning。

## 搭配 AWS SDK 使用此服務
<a name="sdk-general-information-section"></a>

AWS 軟體開發套件 (SDKs) 適用於許多熱門的程式設計語言。每個 SDK 都提供 API、程式碼範例和說明文件，讓開發人員能夠更輕鬆地以偏好的語言建置應用程式。


| SDK 文件 | 代碼範例 | 
| --- | --- | 
| [適用於 C\$1\$1 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-cpp) | [適用於 C\$1\$1 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/cpp) | 
| [AWS CLI](https://docs.aws.amazon.com/cli) | [AWS CLI 程式碼範例](https://docs.aws.amazon.com/code-library/latest/ug/cli_2_code_examples.html) | 
| [適用於 Go 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-go) | [適用於 Go 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/gov2) | 
| [適用於 Java 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-java) | [適用於 Java 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javav2) | 
| [適用於 JavaScript 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-javascript) | [適用於 JavaScript 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javascriptv3) | 
| [適用於 Kotlin 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-kotlin) | [適用於 Kotlin 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin) | 
| [適用於 .NET 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-net) | [適用於 .NET 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv3) | 
| [適用於 PHP 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-php) | [適用於 PHP 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/php) | 
| [AWS Tools for PowerShell](https://docs.aws.amazon.com/powershell) | [AWS Tools for PowerShell 程式碼範例](https://docs.aws.amazon.com/code-library/latest/ug/powershell_5_code_examples.html) | 
| [適用於 Python (Boto3) 的 AWS SDK](https://docs.aws.amazon.com/pythonsdk) | [適用於 Python (Boto3) 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python) | 
| [適用於 Ruby 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-ruby) | [適用於 Ruby 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/ruby) | 
| [適用於 Rust 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-rust) | [適用於 Rust 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1) | 
| [適用於 SAP ABAP 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-sapabap) | [適用於 SAP ABAP 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap) | 
| [適用於 Swift 的 AWS SDK](https://docs.aws.amazon.com/sdk-for-swift) | [適用於 Swift 的 AWS SDK 程式碼範例](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/swift) | 

如需此服務的特定範例，請參閱 [Aurora AWS SDKs的程式碼範例](service_code_examples.md)。

**可用性範例**  
找不到所需的內容嗎？ 請使用本頁面底部的**提供意見回饋**連結申請程式碼範例。