Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable Encryption at Rest on DynamoDB with CloudFormation

I'm trying to figure out if it's possible to create a DynamoDB table using CloudFormation but with Encryption at Rest.

I've managed to find the following develop guide but it just tells you how to create the table using the Console and the AWS CLI: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/encryption.tutorial.html

From looking at the SDKs seems that you need to set a property on SSEEnabled on SSESpecification to true but can this go in the cloudformation template? and if so where?

AWS::DynamoDB::Table

like image 484
Kevin Smith Avatar asked May 22 '18 10:05

Kevin Smith


People also ask

How do I enable encryption in DynamoDB?

Go to the Additional settings tab. Under Encryption, choose Manage encryption. Choose an encryption type: Owned by Amazon DynamoDB.

Does DynamoDB support encryption at rest?

Amazon DynamoDB is a fully managed, multi-region, multi-master database that by default encrypts all your data at rest to help enhance the security of your DynamoDB data. You can use the default encryption, the AWS owned customer master key (CMK), or the AWS managed CMK to encrypt all your data.

Can we enable encryption on existing DynamoDB table?

All table data is encrypted. Server-side encryption at rest is enabled on all DynamoDB table data and cannot be disabled. You cannot encrypt only a subset of items in a table. DynamoDB has encrypted all existing tables that were previously unencrypted by using the AWS owned key.

Is DynamoDB table encrypted by default?

By default, all tables are encrypted under an AWS owned customer master key (CMK) in the DynamoDB service account. In addition to encryption at rest, which is a server-side encryption feature, AWS provides the Amazon DynamoDB Encryption Client .


1 Answers

You should be able to add it in when creating the table in the template:

{
    "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
    }
  }
}

Here's link from the docs: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html

Could it be an IntelliSense issue?

like image 112
Kirill Avatar answered Sep 28 '22 16:09

Kirill