如何通过 cloudformation 模板启用安全中心

How to enable the security hub through cloudformation template

我正在尝试启用 AWS Security Hub 以及 AWS Foundation Security Best Practice 和 CIS Benchmarking with Cloudformation 模板。

AWSTemplateFormatVersion: 2010-09-09
Description: 

Resources:
  SecurityHub:
    Type: "AWS::SecurityHub::Hub"
    Properties: {}
Parameters: {}
Metadata: {}
Conditions: {}

此代码是否正确或我需要添加更多?

根据 the documentation 这似乎是正确的。但是,如果 ParametersMetadataConditions 键为空,则无需定义它们。我什至认为您可以省略 SecurityHub 资源中的 Properties,但我不确定并且无法轻易找到文档 link 来证实。