簡體   English   中英

AWS DynamoDB Cloudformation 模板驗證失敗 - “未加密”, - 但它是

[英]AWS DynamoDB Cloudformation template validation failing - "not encrypted", - but it is

我使用 AWS CDK 使用 AWS 托管加密制作了一個 DynamoDB 表(“UserActivityXXXX”)。 它的模板如下所示,屬性 SSESpecification.SSEEnable 設置為 true。 但是,在運行模板驗證時,它失敗了,ddb 表沒有加密,我應該添加該屬性(下面的屏幕截圖)。

誰能幫我解決這個問題。 謝謝!!

CDK代碼

    const userActivityTable = new dynamodb.Table(this, "UserActivityTable", {
        encryption: dynamodb.TableEncryption.AWS_MANAGED,
        partitionKey: {name: "userid", type: dynamodb.AttributeType.STRING}
    })

模板

  UserActivityTableXXXX:
    Type: AWS::DynamoDB::Table
    Properties:
      KeySchema:
        - AttributeName: userid
          KeyType: HASH
      AttributeDefinitions:
        - AttributeName: userid
          AttributeType: S
      ProvisionedThroughput:
        ReadCapacityUnits: 5
        WriteCapacityUnits: 5
      SSESpecification:
        SSEEnabled: true

錯誤

| Resources: 
| 
| ► Failing in ressource: UserActivityTableXXXX, with Type: COMPLIANCE, Severity: 3
| Name: dynamodb-encryption-check
| Description: DynamoDB table is not encrypted.
| How-to fix: Use attribute SSEEnabled=true. 
| 
| 
|
| DynamoDB Table is not compliant

您使用的是哪種規則機制,AWS Config? 如果是這樣,那么您必須 state kmsKeyArns輸入參數中的 KMS ARN 才能使規則合規。

https://docs.aws.amazon.com/config/latest/developerguide/dynamodb-table-encrypted-kms.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM