Search code examples
amazon-web-servicesaws-cloudformationaws-security-hub

How to enable the security hub through cloudformation template


I'm trying to enable the AWS Security Hub along with AWS Foundation Security Best Practice and CIS Benchmarking with Cloudformation template.

AWSTemplateFormatVersion: 2010-09-09
Description: 

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

Is this Code correct or should I need to add more?


Solution

  • According to the documentation this seems correct. However, you don't need to define the Parameters, Metadata and Conditions keys if they are empty. I even think you can omit the Properties in the SecurityHub resource, but I am not sure and can't easily find a documentation link to corroborate.