如何使用CloudFormation在DynamoDB上启用静态加密

Kev*_*ith 4 aws-cloudformation amazon-dynamodb

我试图弄清楚是否可以使用CloudFormation创建DynamoDB表,但使用Restption at Rest.

我设法找到了以下开发指南,但它只是告诉您如何使用控制台和AWS CLI创建表:https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/encryption.tutorial. HTML

从看的SDK看来你需要在设置属性SSEEnabledSSESpecificationtrue但这可以走在cloudformation模板?如果有的话?

AWS :: DynamoDB ::表

小智 5

您应该能够在模板中创建表时添加它:

{
    "Type" : "AWS::DynamoDB::Table",
    "Properties" : {
      "AttributeDefinitions" : [ AttributeDefinition, ... ],
      "GlobalSecondaryIndexes" : [ GlobalSecondaryIndexes, ... ],
      "KeySchema" : [ KeySchema, ... ],
      "LocalSecondaryIndexes" : [ LocalSecondaryIndexes, ... ],
      "ProvisionedThroughput" : ProvisionedThroughput,
      "SSESpecification" : {
          "SSEEnabled": true
        },
      "StreamSpecification" : StreamSpecification,
      "TableName" : String,
      "Tags" : [ Resource Tag, ... ],
      "TimeToLiveSpecification" : TimeToLiveSpecification
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

以下是来自文档的链接:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html

它可能是一个IntelliSense问题吗?

  • 是的,奇怪地运行CloudFormation脚本工作得很好,这只是一个VS错误. (2认同)