如何静态加密 sns 主题以避免云更改

How to encrypt sns topic at rest to avoid cloud alters

目前 sns 主题是从 ansible 脚本生成的,下面是我认为生成它的片段。

    Resources:
     NotificaionTopic:
        Type: "AWS::SNS::Topic"
        Properties:
          Subscription:
           - Endpoint: xxxx@test.com
             protocol: email

我需要加密 sns 主题,请问我需要做哪些更改才能开始加密 sns 主题。

非常感谢任何帮助。

如果您向资源提供 KmsMasterKeyId,该服务将加密主题。

Type: AWS::SNS::Topic
Properties: 
  ContentBasedDeduplication: Boolean
  DisplayName: String
  KmsMasterKeyId: String
  Subscription: 
    - Subscription
  Tags: 
    - Tag
  TopicName: String

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html