Project: KICS (Provisioning / Security & Compliance)
File: 4e67c0ae-38a0-47f4-a50c-f0c9b75826df.md

title: BOM - AWS DynamoDB hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 4e67c0ae-38a0-47f4-a50c-f0c9b75826df Query name: BOM - AWS DynamoDB Platform: CloudFormation Severity: <span style="color:#CCCCCC">Trace</span> Category: Bill Of Materials URL: A list of DynamoDB resources found. Amazon DynamoDB is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale.<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="27" AWSTemplateFormatVersion: '2010-09-09' Resources: DynamoDBEndpoint: Type: "AWS::EC2::VPCEndpoint" Properties: RouteTableIds: !Ref PublicRouteTable !Ref Private0RouteTable !Ref Private1RouteTable !Ref Private2RouteTable ServiceName: !Sub "com.amazonaws.${AWS::Region}.dynamodb" VpcId: !Ref VPC PolicyDocument: { "Id": "Policy", "Version": "2012-10-17", "Statement": [ { "Sid": "Statement", "Action": "dynamodb:*", "Effect": "Allow", "Resource": "arn:aws:dynamodb:ap-southeast-2:123412341234:table/test", "Principal": "*" } ] } DynamoDBOnDemandTable2: Type: "AWS::DynamoDB::Table" Properties: TableName: test AttributeDefinitions: AttributeName: pk AttributeType: S KeySchema: AttributeName: pk KeyType: HASH BillingMode: PAYPERREQUEST SSESpecification: SSEEnabled: false SSEType: "KMS" ``` ```yaml title="Positive test num. 2 - yaml file" hl_lines="27" AWSTemplateFormatVersion: '2010-09-09' Resources: DynamoDBEndpoint: Type: "AWS::EC2::VPCEndpoint" Properties: RouteTableIds: !Ref PublicRouteTable !Ref Private0RouteTable !Ref Private1RouteTable !Ref Private2RouteTable ServiceName: !Sub "com.amazonaws.${AWS::Region}.dynamodb" VpcId: !Ref VPC PolicyDocument: { "Id": "Policy", "Version": "2012-10-17", "Statement": [ { "Sid": "Statement", "Action": "dynamodb:*", "Effect": "Allow", "Resource": "*", "Principal": "*" } ] } DynamoDBOnDemandTable2: Type: "AWS::DynamoDB::Table" Properties: TableName: test2 AttributeDefinitions: AttributeName: pk AttributeType: S KeySchema: AttributeName: pk KeyType: HASH BillingMode: PAYPERREQUEST SSESpecification: SSEEnabled: false SSEType: "KMS" ``` ```yaml title="Positive test num. 3 - yaml file" hl_lines="27" AWSTemplateFormatVersion: '2010-09-09' Resources: DynamoDBEndpoint: Type: "AWS::EC2::VPCEndpoint" Properties: RouteTableIds: !Ref PublicRouteTable !Ref Private0RouteTable !Ref Private1RouteTable !Ref Private2RouteTable ServiceName: !Sub "com.amazonaws.${AWS::Region}.dynamodb" VpcId: !Ref VPC PolicyDocument: { "Id": "Policy", "Version": "2012-10-17", "Statement": [ { "Sid": "Statement", "Action": "dynamodb:*", "Effect": "Allow", "Resource": "arn:aws:dynamodb:ap-southeast-2:123412341234:table/other", "Principal": "*" } ] } DynamoDBOnDemandTable2: Type: "AWS::DynamoDB::Table" Properties: TableName: test3 AttributeDefinitions: AttributeName: pk AttributeType: S KeySchema: AttributeName: pk KeyType: HASH BillingMode: PAYPERREQUEST SSESpecification: SSEEnabled: false SSEType: "KMS" ``` <details><summary>Positive test num. 4 - yaml file</summary> ```yaml hl_lines="3" AWSTemplateFormatVersion: '2010-09-09' Resources: DynamoDBOnDemandTable2: Type: "AWS::DynamoDB::Table" Properties: TableName: test4 AttributeDefinitions: AttributeName: pk AttributeType: S KeySchema: AttributeName: pk KeyType: HASH BillingMode: PAYPERREQUEST SSESpecification: SSEEnabled: false SSEType: "KMS" ``` </details> ```yaml title="Negative test num. 1 - yaml file" AWSTemplateFormatVersion: '2010-09-09' Resources: myDistribution: Type: AWS::CloudFront::Distribution Properties: DistributionConfig: Enabled: true ```