如何通过 cloudformation create/add 一个 encryption/key 到发电机 table?
How to create/add an encryption/key to a dynamo table via cloudformation?
请参阅下面的示例 dynamodb table 和 cloudformation 模板。当我在下面创建 table 时,aws 会采取什么加密措施来保护我的数据(如果它能做到这一切)?如果没有,我如何在下面的模板中指定我想使用 aws 本身提供的密钥加密我的数据(如果可能)。如果不是我假设,我也需要为此添加一个关键资源。
AWSTemplateFormatVersion: "2010-09-09"
Resources:
myDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
-
AttributeName: "product"
AttributeType: "S"
-
AttributeName: "model"
AttributeType: "S"
KeySchema:
-
AttributeName: "product"
KeyType: "HASH"
-
AttributeName: "Model"
KeyType: "RANGE"
ProvisionedThroughput:
ReadCapacityUnits: "5"
WriteCapacityUnits: "5"
TableName: "InfoTable"
如前所述 here,将 SSESpecification
添加到您的 table。所以:
AWSTemplateFormatVersion: "2010-09-09"
Resources:
myDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
-
AttributeName: "product"
AttributeType: "S"
-
AttributeName: "model"
AttributeType: "S"
KeySchema:
-
AttributeName: "product"
KeyType: "HASH"
-
AttributeName: "Model"
KeyType: "RANGE"
ProvisionedThroughput:
ReadCapacityUnits: "5"
WriteCapacityUnits: "5"
TableName: "InfoTable"
SSESpecification:
SSEEnabled: 'true'
这会使用 AWS 管理的加密密钥加密 table。
请参阅下面的示例 dynamodb table 和 cloudformation 模板。当我在下面创建 table 时,aws 会采取什么加密措施来保护我的数据(如果它能做到这一切)?如果没有,我如何在下面的模板中指定我想使用 aws 本身提供的密钥加密我的数据(如果可能)。如果不是我假设,我也需要为此添加一个关键资源。
AWSTemplateFormatVersion: "2010-09-09"
Resources:
myDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
-
AttributeName: "product"
AttributeType: "S"
-
AttributeName: "model"
AttributeType: "S"
KeySchema:
-
AttributeName: "product"
KeyType: "HASH"
-
AttributeName: "Model"
KeyType: "RANGE"
ProvisionedThroughput:
ReadCapacityUnits: "5"
WriteCapacityUnits: "5"
TableName: "InfoTable"
如前所述 here,将 SSESpecification
添加到您的 table。所以:
AWSTemplateFormatVersion: "2010-09-09"
Resources:
myDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
-
AttributeName: "product"
AttributeType: "S"
-
AttributeName: "model"
AttributeType: "S"
KeySchema:
-
AttributeName: "product"
KeyType: "HASH"
-
AttributeName: "Model"
KeyType: "RANGE"
ProvisionedThroughput:
ReadCapacityUnits: "5"
WriteCapacityUnits: "5"
TableName: "InfoTable"
SSESpecification:
SSEEnabled: 'true'
这会使用 AWS 管理的加密密钥加密 table。