

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

# AWS SRA 範例的程式碼儲存庫
<a name="code-repo"></a>


|  | 
| --- |
| 進行[簡短的問卷](https://amazonmr.au1.qualtrics.com/jfe/form/SV_e3XI1t37KMHU2ua)，以影響 AWS 安全參考架構 (AWS SRA) 的未來。 | 

為了協助您開始建置和實作 AWS SRA 中的指引，位於 https：//[https://github.com/aws-samples/aws-security-reference-architecture-examples](https://github.com/aws-samples/aws-security-reference-architecture-examples) 的基礎設施即程式碼 (IaC) 儲存庫隨附於本指南。此儲存庫包含程式碼，可協助開發人員和工程師部署本文件中呈現的一些指引和架構模式。此程式碼取自 AWS Professional Services 顧問與客戶的第一手經驗。這些範本本質上是一般的，其目標是說明實作模式，而不是提供完整的解決方案。 AWS 服務 組態和資源部署刻意非常嚴格。您可能需要修改和量身打造這些解決方案，以符合您的環境和安全需求。

 AWS SRA 程式碼儲存庫提供具有 AWS CloudFormation 和 Terraform 部署選項的程式碼範例。解決方案模式支援兩個環境：一個需要 AWS Control Tower ，另一個 AWS Organizations 不使用 AWS Control Tower。此儲存庫中需要 的解決方案 AWS Control Tower 已在AWS Control Tower環境中使用 和 [Customizations for AWS Control Tower (CfCT)](https://aws.amazon.com/solutions/implementations/customizations-for-aws-control-tower/) 部署 AWS CloudFormation和測試。不需要 的解決方案 AWS Control Tower 已在 AWS Organizations環境中使用 進行測試 AWS CloudFormation。CfCT 解決方案可協助客戶根據 AWS 最佳實務快速設定安全的多帳戶 AWS 環境。透過自動設定環境以執行安全且可擴展的工作負載，同時透過建立帳戶和資源來實作初始安全基準，有助於節省時間。 AWS Control Tower 還提供基準環境，以開始使用多帳戶架構、身分和存取管理、控管、資料安全、網路設計和記錄。 AWS SRA 儲存庫中的解決方案提供額外的安全組態，以實作本文件中所述的模式。

以下是 [AWS SRA 儲存庫](https://github.com/aws-samples/aws-security-reference-architecture-examples)中解決方案的摘要。每個解決方案都包含包含詳細資訊`README.md`的檔案。 
+ [CloudTrail Organization](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/cloudtrail/cloudtrail_org) 解決方案會在組織管理帳戶中建立組織追蹤，並將管理委派給成員帳戶，例如稽核或安全工具帳戶。此追蹤會使用安全工具帳戶中建立的客戶受管金鑰進行加密，並將日誌交付至日誌封存帳戶中的 S3 儲存貯體。或者，可為 Amazon S3 和 AWS Lambda 函數啟用資料事件。組織追蹤會記錄組織中所有 的事件 AWS 帳戶 ， AWS 同時防止成員帳戶修改組態。
+ [GuardDuty Organization](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/guardduty/guardduty_org) 解決方案透過將管理委派給安全工具帳戶來啟用 Amazon GuardDuty。它會針對所有現有和未來的 AWS 組織帳戶，在安全工具帳戶中設定 GuardDuty。GuardDuty 調查結果也會使用 KMS 金鑰加密，並傳送至 Log Archive 帳戶中的 S3 儲存貯體。
+ [Security Hub CSPM Organization ](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/securityhub/securityhub_org)****解決方案透過將管理委派給 Security Tooling 帳戶來設定 Security Hub CSPM。它會為所有現有和未來的 AWS 組織帳戶設定 Security Tooling 帳戶中的 Security Hub CSPM。解決方案也提供跨所有帳戶和區域同步已啟用安全標準的參數，以及在安全工具帳戶中設定區域彙總工具。在 Security Tooling 帳戶中集中 Security Hub CSPM 提供安全標準合規性的跨帳戶檢視，以及來自 AWS 服務 和第三方 AWS Partner 整合的問題清單。
+ [Inspector](https://github.com/aws-samples/aws-security-reference-architecture-examples/blob/main/aws_sra_examples/solutions/inspector/inspector_org) 解決方案會針對組織下的所有帳戶和受管區域，在委派的管理員 （安全工具） 帳戶中設定 AWS Amazon Inspector。
+ [Firewall Manager](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/firewall_manager/firewall_manager_org) 解決方案透過將管理委派給安全工具帳戶，並使用**** AWS Firewall Manager 安全群組政策和多個 AWS WAF 政策設定 Firewall Manager 來設定安全政策。安全群組政策需要 VPC （由解決方案現有或建立） 內允許的最大安全群組，該 VPC 由解決方案部署。
+ [Macie Organization](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/macie/macie_org) 解決方案透過將管理委派給安全工具帳戶來啟用 Amazon Macie。它會為所有現有和未來的 AWS 組織帳戶設定安全工具帳戶中的 Macie。Macie 進一步設定為將其探索結果傳送至使用 KMS 金鑰加密的中央 S3 儲存貯體。
+ AWS Config:
  + [Config Aggregator](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/config/config_aggregator_org) ****解決方案透過將管理委派給 Security Tooling AWS Config 帳戶來設定彙總工具。然後，解決方案會針對 AWS 組織中所有現有和未來的帳戶，在安全工具帳戶中設定 AWS Config 彙總工具。
  + 透過將管理 AWS Config 規則 委派給 安全工具帳戶來部署[一致性套件組織規則](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/config/config_conformance_pack_org)解決方案。然後，它會在委派管理員帳戶中為組織中的所有現有和未來帳戶建立 AWS 組織一致性套件。解決方案已設定為部署[加密和金鑰管理一致性套件範例範本的操作最佳實務](https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-Encryption-and-Keys.html)。
  + [AWS Config Control Tower 管理帳戶](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/config/config_management_account)解決方案 AWS Config 會在 AWS Control Tower 管理帳戶中啟用 AWS Config ，並相應地更新安全工具帳戶中的彙總工具。解決方案使用 AWS Control Tower CloudFormation 範本來啟用 AWS Config 做為參考，以確保與 AWS 組織中其他 帳戶的一致性。
+ IAM：
  + [Access Analyzer](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/iam/iam_access_analyzer) 解決方案透過將管理委派給 安全工具帳戶來啟用 IAM Access Analyzer。然後，它會為組織中的所有現有和未來帳戶，在安全工具帳戶中設定 AWS 組織層級的 IAM Access Analyzer。解決方案也會將 IAM Access Analyzer 部署到所有成員帳戶和區域，以支援分析帳戶層級許可。
  + [IAM 密碼政策](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/iam/iam_password_policy)解決方案會 AWS 帳戶 更新 AWS 組織中所有帳戶中的密碼政策。解決方案提供設定密碼政策設定的參數，協助您符合產業合規標準。
+ [EC2 預設 EBS 加密](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/ec2/ec2_default_ebs_encryption)解決方案 AWS 區域 會在 AWS 組織中的每個 AWS 帳戶 和 內啟用帳戶層級的預設 Amazon EBS 加密。它強制加密您建立的新 EBS 磁碟區和快照。例如，Amazon EBS 會加密啟動執行個體時建立的 EBS 磁碟區，以及從未加密快照複製的快照。
+ [S3 封鎖帳戶公開存取](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/s3/s3_block_account_public_access)解決方案 AWS 帳戶 會在 AWS 組織中的每個 內啟用 Amazon S3 帳戶層級設定。Amazon S3 封鎖公開存取功能可提供存取點、儲存貯體和帳戶的設定，以協助您管理對 Amazon S3 資源的公開存取。依預設，新的儲存貯體、存取點和物件不允許公開存取。不過，使用者可以修改儲存貯體政策、存取點政策或物件許可，以允許公開存取。Amazon S3 封鎖公開存取設定會覆寫這些政策和許可，讓您可以限制對這些資源的公開存取。
+ [Detective Organization](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/detective/detective_org) 解決方案會將管理委派給 帳戶 （例如 Audit 或 Security Tooling 帳戶），並為所有現有和未來的 AWS Organizations 帳戶設定 Detective，以自動化啟用 Amazon Detective。
+ [Shield Advanced](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/shield_advanced/shield_advanced) 解決方案可自動部署 AWS Shield Advanced ，為您的應用程式提供增強的 DDoS 保護 AWS。
+ [AMI Bakery Organization](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/ami_bakery/ami_bakery_org) 解決方案有助於自動化建置和管理標準強化 Amazon Machine Image (AMI) 映像的程序。這可確保 AWS 執行個體的一致性和安全性，並簡化部署和維護任務。
+ [修補程式管理員](https://github.com/aws-samples/aws-security-reference-architecture-examples/tree/main/aws_sra_examples/solutions/patch_mgmt/patch_mgmt_org)解決方案有助於簡化跨多個 的修補程式管理 AWS 帳戶。您可以使用此解決方案更新所有受管執行個體上的 AWS Systems Manager Agent (SSM Agent)，並在 Windows 和 Linux 標記的執行個體上掃描和安裝關鍵和重要的安全修補程式和錯誤修正。解決方案也會設定預設主機管理組態設定，以偵測新 的建立， AWS 帳戶 並自動將解決方案部署到這些帳戶。