Error message for PAY_PER_REQUEST billing mode
diff --git a/localstack/services/cloudformation/models/dynamodb.py b/localstack/services/cloudformation/models/dynamodb.py
index 254e9bca1c80b..339acfe09db7f 100644
--- a/localstack/services/cloudformation/models/dynamodb.py
+++ b/localstack/services/cloudformation/models/dynamodb.py
@@ -9,6 +9,9 @@ def get_ddb_provisioned_throughput(params, **kwargs):
     args = params.get("ProvisionedThroughput")
     if args == PLACEHOLDER_AWS_NO_VALUE:
         return {}
+    is_ondemand = params.get("BillingMode") == "PAY_PER_REQUEST"
+    if is_ondemand and args is None:
+        return
     if args:
         if isinstance(args["ReadCapacityUnits"], str):
             args["ReadCapacityUnits"] = int(args["ReadCapacityUnits"])
@@ -64,6 +67,15 @@ def fetch_state(self, stack_name, resources):
         table_name = self.resolve_refs_recursively(stack_name, table_name, resources)
         return aws_stack.connect_to_service("dynamodb").describe_table(TableName=table_name)
 
+    @staticmethod
+    def add_defaults(resource, stack_name: str):
+        is_pay_per_request = resource.get("Properties", {}).get("BillingMode") == "PAY_PER_REQUEST"
+        if not is_pay_per_request:
+            resource["Properties"]["ProvisionedThroughput"] = {
+                "ReadCapacityUnits": 5,
+                "WriteCapacityUnits": 5,
+            }
+
     @classmethod
     def get_deploy_templates(cls):
         def _pre_create(resource_id, resources, resource_type, func, stack_name):
@@ -96,12 +108,6 @@ def _generate_res_name():  # TODO: generalize
                             )
                         ),
                     },
-                    "defaults": {
-                        "ProvisionedThroughput": {
-                            "ReadCapacityUnits": 5,
-                            "WriteCapacityUnits": 5,
-                        }
-                    },
                 },
                 {
                     "function": "enable_kinesis_streaming_destination",
diff --git a/localstack/services/dynamodb/provider.py b/localstack/services/dynamodb/provider.py
index f1c313c2c085c..95370e84e18a4 100644
--- a/localstack/services/dynamodb/provider.py
+++ b/localstack/services/dynamodb/provider.py
@@ -23,6 +23,7 @@
     BatchGetRequestMap,
     BatchWriteItemInput,
     BatchWriteItemOutput,
+    BillingMode,
     CreateGlobalTableOutput,
     CreateTableInput,
     CreateTableOutput,
@@ -386,6 +387,13 @@ def create_table(
         table_name = create_table_input["TableName"]
         if self.table_exists(table_name):
             raise ResourceInUseException("Cannot create preexisting table")
+        billing_mode = create_table_input.get("BillingMode")
+        provisioned_throughput = create_table_input.get("ProvisionedThroughput")
+        if billing_mode == BillingMode.PAY_PER_REQUEST and provisioned_throughput is not None:
+            raise ValidationException(
+                "One or more parameter values were invalid: Neither ReadCapacityUnits nor WriteCapacityUnits can be "
+                "specified when BillingMode is PAY_PER_REQUEST"
+            )
 
         # forward request to backend
         result = self.forward_request(context)
diff --git a/tests/integration/test_dynamodb.py b/tests/integration/test_dynamodb.py
index 3a31327eb2412..a8311b03f1258 100644
--- a/tests/integration/test_dynamodb.py
+++ b/tests/integration/test_dynamodb.py
@@ -978,6 +978,20 @@ def test_dynamodb_batch_write_item(self):
 
         assert result.get("UnprocessedItems") == {}
 
+    def test_dynamodb_pay_per_request(self):
+        dynamodb = aws_stack.create_external_boto_client("dynamodb")
+        table_name = "ddb-table-%s" % short_uid()
+
+        with pytest.raises(Exception) as e:
+            dynamodb.create_table(
+                TableName=table_name,
+                KeySchema=[{"AttributeName": "id", "KeyType": "HASH"}],
+                AttributeDefinitions=[{"AttributeName": "id", "AttributeType": "S"}],
+                ProvisionedThroughput={"ReadCapacityUnits": 5, "WriteCapacityUnits": 5},
+                BillingMode="PAY_PER_REQUEST",
+            )
+        assert e.match("ValidationException")
+
     def test_dynamodb_create_table_with_sse_specification(self):
         dynamodb = aws_stack.create_external_boto_client("dynamodb")
         table_name = "ddb-table-%s" % short_uid()

As reported in #4982, when a table is created with `PAY_PER_REQUEST` billing mode and a provisioned throughput is specified as well, we should return a `ValidationException`. 

