Skip to content

Property ProvisionedThroughput cannot be empty #4651

Description

@paul-uz

CloudFormation Lint Version

1.55.0

What operating system are you using?

MacOS

Describe the bug

A stack failed to deploy due to Property ProvisionedThroughput cannot be empty for a DynamoDB Table.

Inspecting the template, it looks like BillingMode: PAY_PER_REQUEST was missing (we use this for all other tables), but cfn-lint didn't report this, no error, no warning.

Expected behavior

cfn-lint should error if BillingMode is not present for tables

cfn-lint should error if ProvisionedThroughput is not set, when BillingMode is not set (Provisioned Throughput by default), or, if ProvisionedThroughput is not set AND BillingMode is set to PAY_PER_REQUEST

Reproduction template

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Style Configuration
Mappings:
  TableNames:
    Styles:
      TableName: Styles-Config
Resources:
  StylesTable:
    Type: AWS::DynamoDB::Table
    Properties:
      TableName: !FindInMap [TableNames, Styles, TableName]
      AttributeDefinitions:
        - AttributeName: "styleID"
          AttributeType: "S"
      KeySchema:
        - AttributeName: "styleID"
          KeyType: "HASH"
      PointInTimeRecoverySpecification:
        PointInTimeRecoveryEnabled: true
      StreamSpecification:
        StreamViewType: "NEW_AND_OLD_IMAGES"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions