|
3 | 3 |
|
4 | 4 | ## Description: |
5 | 5 |
|
6 | | -This solution creates an [AWS DynamoDB](https://aws.amazon.com/dynamodb/) encrypted table with a primary key and sort key. |
| 6 | +This <a href="https://aws.amazon.com/cloudformation/" target="_blank">AWS CloudFormation</a> solution creates an AES-256 encrypted <a href="https://aws.amazon.com/dynamodb/" target="_blank"> AWS DynamoDB</a> table. The encryption key is managed via <a href="https://aws.amazon.com/kms" target="_blank"> AWS KMS</a>. Once your data is encrypted, Amazon DynamoDB handles authentication of access and decryption of your data transparently with a minimal impact on performance. You don't need to modify your database client applications to use encryption at rest. |
7 | 7 |
|
8 | | -The AWS CloudFormation template creates a AWS DynamoDB encrypted example table that reflects a scenario where you have clients and invoices associated to those clients. The primary keys would be email address and the sort key would be invoices |
| 8 | +<img src="encrypted-aws-dynamodb.png" alt="Encrypted DynamoDB" /> |
9 | 9 |
|
10 | | -Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale. It's a fully managed, multi-region, multi-master database with built-in security, backup and restore, and in-memory caching for internet-scale applications. |
| 10 | +AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment. |
11 | 11 |
|
12 | | -_***note AWS DynamoDB will incur costs**_ |
| 12 | +Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale. It's a fully managed, multiregion, multimaster database with built-in security, backup and restore, and in-memory caching for internet-scale applications. DynamoDB can handle more than 10 trillion requests per day and can support peaks of more than 20 million requests per second. |
13 | 13 |
|
14 | | -* [DynamoDB pricing](https://aws.amazon.com/dynamodb/pricing/) resource used in example: 1 Provisioned Write and 1 Provisioned Read Capacity Unit |
| 14 | +AWS Key Management Service (KMS) makes it easy for you to create and manage keys and control the use of encryption across a wide range of AWS services and in your applications. AWS KMS is a secure and resilient service that uses FIPS 140-2 validated hardware security modules to protect your keys. |
15 | 15 |
|
16 | | -## Prerequisites: |
| 16 | +## AWS Resource Costs |
17 | 17 |
|
18 | | -* AWS account and environment configured with AWS Credentials |
19 | | -* IAM user with AWSCloudFormationReadOnlyAccess, AmazonDynamoDBFullAccess |
| 18 | +As with most AWS services you will incur costs for usage. For this CloudFormation template the resources that incur costs are as follows. |
20 | 19 |
|
21 | | -## See how it works: |
| 20 | +* Pricing: |
22 | 21 |
|
23 | | -AWS Management Console |
| 22 | + * <a href="https://aws.amazon.com/dynamodb/pricing/" target="_blank">DynamoDB pricing</a> resource used in example: *1 Provisioned Write and 1 Provisioned Read Capacity Unit* |
| 23 | + * <a href="https://aws.amazon.com/kms/pricing/" target="_blank">KMS pricing</a> resource used in example: *1 KMS key* |
24 | 24 |
|
25 | | -* Login to AWS Management Console |
26 | | -* Launch in CloudFormation encrypted-dynamodb-cf-template.yml (from the repo you cloned) |
| 25 | +## Prerequisites |
27 | 26 |
|
28 | | -CloudFormation Fields |
| 27 | +* <a href="https://aws.amazon.com" target="_blank"> Amazon Web Services Account</a> |
| 28 | +* <a href="https://aws.amazon.com/iam/" target="_blank">IAM</a> user with the following permissions: |
| 29 | + * AWSCloudFormationReadOnlyAccess |
| 30 | + * AmazonDynamoDBFullAccess |
29 | 31 |
|
30 | | -* Stack name (Enter a name to associate to your AWS DynamoDB deployment)**Next** |
31 | | -* Continue choosing **Next** |
32 | | -* Click **Create** |
| 32 | +## CloudFormation Template |
33 | 33 |
|
34 | | -## Test: |
| 34 | +* The CloudFormation Template is available on GitHub: |
| 35 | + * <a href="https://github.com/getcft/aws-encrypted-dynamodb-cf-template" target="_blank">aws-encrypted-dynamodb-cf-template</a> |
35 | 36 |
|
36 | | -In the AWS Management Console under DynamoDB you should be able to verify the following have been created: |
| 37 | +## Deploy the CloudFormation Template |
37 | 38 |
|
38 | | -* 1 encrypted table named "Client_Invoice" |
39 | | -* 1 Provisioned Write and 1 Provisioned Read Capacity Unit |
40 | | -* Primary Key "client_email" |
41 | | -* Sort Key "invoice_number" |
| 39 | +* AWS Management Console |
| 40 | + |
| 41 | + * Login to *AWS Management Console* |
| 42 | + * Launch under *CloudFormation* your *encrypted-dynamodb-cf-template.yml* (included in this repo) |
| 43 | + |
| 44 | +* CloudFormation Fields: |
| 45 | + |
| 46 | + * *Stack name* (Enter a name to associate to your AWS DynamoDB deployment) |
| 47 | + * Continue choosing *Next* |
| 48 | + * Click *Create* (This will take a few minutes for resources to be created) |
| 49 | + |
| 50 | +## Results of the CloudFormation Template |
| 51 | + |
| 52 | +In the *AWS Management Console* you should be able to verify the following have been created. |
| 53 | + |
| 54 | +* Resources Created: |
| 55 | + * 1 KMS AWS owned CMK for encryption |
| 56 | + * 1 example *Client_Invoice* encrypted DynamoDB table, with a primary partition key *client_email* (type string), and a primary sort key *invoice_number* (type string). |
0 commit comments