### # DYNAMODB_PITR_ENABLED test ### --- - name: Empty, SKIP input: {} expectations: rules: DYNAMODB_PITR_ENABLED: SKIP - name: Scenario a) No resources, SKIP input: Resources: {} expectations: rules: DYNAMODB_PITR_ENABLED: SKIP - name: Scenario b) DynamoDB Table with PITR disabled but rule is suppressed, SKIP input: Resources: Exampletable: Type: AWS::DynamoDB::Table Metadata: guard: SuppressedRules: - "DYNAMODB_PITR_ENABLED" Properties: KeySchema: - AttributeName: Id KeyType: HASH AttributeDefinitions: - AttributeName: Id AttributeType: S - AttributeName: dummy AttributeType: S - AttributeName: name AttributeType: S - AttributeName: owner AttributeType: S - AttributeName: createdAt AttributeType: S PointInTimeRecoverySpecification: PointInTimeRecoveryEnabled: true expectations: rules: DYNAMODB_PITR_ENABLED: SKIP - name: Scenario c) DynamoDB Table with a missing PITR configuration, FAIL input: Resources: Exampletable: Type: AWS::DynamoDB::Table Properties: KeySchema: - AttributeName: Id KeyType: HASH AttributeDefinitions: - AttributeName: Id AttributeType: S - AttributeName: dummy AttributeType: S - AttributeName: name AttributeType: S - AttributeName: owner AttributeType: S - AttributeName: createdAt AttributeType: S expectations: rules: DYNAMODB_PITR_ENABLED: FAIL - name: Scenario d) DynamoDB Table with PointInTimeRecoveryEnabled set to false, FAIL input: Resources: Exampletable: Type: AWS::DynamoDB::Table Properties: KeySchema: - AttributeName: Id KeyType: HASH AttributeDefinitions: - AttributeName: Id AttributeType: S - AttributeName: dummy AttributeType: S - AttributeName: name AttributeType: S - AttributeName: owner AttributeType: S - AttributeName: createdAt AttributeType: S PointInTimeRecoverySpecification: PointInTimeRecoveryEnabled: false expectations: rules: DYNAMODB_PITR_ENABLED: FAIL - name: Scenario e) DynamoDB Table with PointInTimeRecoveryEnabled set to true, PASS input: Resources: Exampletable: Type: AWS::DynamoDB::Table Properties: KeySchema: - AttributeName: Id KeyType: HASH AttributeDefinitions: - AttributeName: Id AttributeType: S - AttributeName: dummy AttributeType: S - AttributeName: name AttributeType: S - AttributeName: owner AttributeType: S - AttributeName: createdAt AttributeType: S PointInTimeRecoverySpecification: PointInTimeRecoveryEnabled: true expectations: rules: DYNAMODB_PITR_ENABLED: PASS