View a markdown version of this page

步驟 6:執行您的第一個彈性測試 (選用) - AWS 彈性中樞

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

步驟 6:執行您的第一個彈性測試 (選用)

透過使用 AWS Fault Injection Service () 注入受控故障,彈性測試有助於驗證您的服務是否如預期運作和復原AWS FIS。在此步驟中,您可以選擇測試範本,為您的服務建立測試,然後開始測試執行。

主控台
  1. 導覽至您的服務,然後選擇測試索引標籤。您將根據服務的架構和彈性政策,看到建議的彈性測試。

  2. 選取測試範本 (例如,可用區域:復原)。選擇檢視詳細資訊,進一步了解建議的測試。

  3. 選擇編輯測試組態、提供任何必要的參數,然後儲存。這會從範本建立您的測試 - 您的組態會儲存並重複使用以供未來執行。您可以隨時編輯測試組態。

  4. 選擇開始測試以開始測試執行。

  5. 監控執行並檢閱是否符合您的復原目標。

AWS CLI
# List the available test templates aws resiliencehubv2 list-test-templates --region us-east-1 # Create a test for your service from a template aws resiliencehubv2 create-test \ --test-template-arn "arn:aws:resiliencehub:us-east-1:aws:test-template/aws-az-recovery:rtaz001" \ --target-identifier "arn:aws:resiliencehub:us-east-1:123456789012:service/api-service:def456" \ --parameters '{"availabilityZone": ["us-east-1a"]}' # Start a test run aws resiliencehubv2 start-test-run --test-id "test-id" # Check the status and results of the test run aws resiliencehubv2 get-test-run --test-run-id "test-run-id"

如需詳細資訊,請參閱恢復能力測試。