Repository: getmoto/moto
Pull request #7752 (2024-06-06 15:14:12)

RDS: parse more input parameters
https://github.com/getmoto/moto/issues/7734

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/getmoto/moto/pull/7752?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) Report
Attention: Patch coverage is `92.30769%` with `1 line` in your changes missing coverage. Please review.
> Project coverage is 94.34%. Comparing base [(`1190098`)](https://app.codecov.io/gh/getmoto/moto/commit/11900987be3f7013f545ffc788259ab0806f624d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) to head [(`5d05d8d`)](https://app.codecov.io/gh/getmoto/moto/commit/5d05d8da879f088de66aef538dd0de9494337acb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto).

| [Files](https://app.codecov.io/gh/getmoto/moto/pull/7752?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | Patch % | Lines |
|---|---|---|
| [moto/rds/models.py](https://app.codecov.io/gh/getmoto/moto/pull/7752?src=pr&el=tree&filepath=moto%2Frds%2Fmodels.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto#diff-bW90by9yZHMvbW9kZWxzLnB5) | 92.30% | [1 Missing :warning: ](https://app.codecov.io/gh/getmoto/moto/pull/7752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) |

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##           master    #7752      +/-   ##
==========================================
- Coverage   94.34%   94.34%   -0.01%     
==========================================
  Files        1092     1092              
  Lines       93138    93150      +12     
==========================================
+ Hits        87868    87879      +11     
- Misses       5270     5271       +1     
```

| [Flag](https://app.codecov.io/gh/getmoto/moto/pull/7752/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | Coverage Δ | |
|---|---|---|
| [servertests](https://app.codecov.io/gh/getmoto/moto/pull/7752/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | `29.54% <7.69%> (-0.01%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/getmoto/moto/pull/7752/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | `94.31% <92.30%> (-0.01%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto#carryforward-flags-in-the-pull-request-comment) to find out more.


</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/getmoto/moto/pull/7752?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto).


Patch:
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone-id/ca-central-1.json b/moto/ec2/resources/instance_type_offerings/availability-zone-id/ca-central-1.json
index 93e18dcac..479842480 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone-id/ca-central-1.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone-id/ca-central-1.json
@@ -339,6 +339,46 @@
   "InstanceType": "c6i.xlarge",
   "Location": "cac1-az1"
  },
+ {
+  "InstanceType": "c6id.12xlarge",
+  "Location": "cac1-az1"
+ },
+ {
+  "InstanceType": "c6id.16xlarge",
+  "Location": "cac1-az1"
+ },
+ {
+  "InstanceType": "c6id.24xlarge",
+  "Location": "cac1-az1"
+ },
+ {
+  "InstanceType": "c6id.2xlarge",
+  "Location": "cac1-az1"
+ },
+ {
+  "InstanceType": "c6id.32xlarge",
+  "Location": "cac1-az1"
+ },
+ {
+  "InstanceType": "c6id.4xlarge",
+  "Location": "cac1-az1"
+ },
+ {
+  "InstanceType": "c6id.8xlarge",
+  "Location": "cac1-az1"
+ },
+ {
+  "InstanceType": "c6id.large",
+  "Location": "cac1-az1"
+ },
+ {
+  "InstanceType": "c6id.metal",
+  "Location": "cac1-az1"
+ },
+ {
+  "InstanceType": "c6id.xlarge",
+  "Location": "cac1-az1"
+ },
  {
   "InstanceType": "c6in.12xlarge",
   "Location": "cac1-az1"
@@ -2207,6 +2247,46 @@
   "InstanceType": "c6i.xlarge",
   "Location": "cac1-az2"
  },
+ {
+  "InstanceType": "c6id.12xlarge",
+  "Location": "cac1-az2"
+ },
+ {
+  "InstanceType": "c6id.16xlarge",
+  "Location": "cac1-az2"
+ },
+ {
+  "InstanceType": "c6id.24xlarge",
+  "Location": "cac1-az2"
+ },
+ {
+  "InstanceType": "c6id.2xlarge",
+  "Location": "cac1-az2"
+ },
+ {
+  "InstanceType": "c6id.32xlarge",
+  "Location": "cac1-az2"
+ },
+ {
+  "InstanceType": "c6id.4xlarge",
+  "Location": "cac1-az2"
+ },
+ {
+  "InstanceType": "c6id.8xlarge",
+  "Location": "cac1-az2"
+ },
+ {
+  "InstanceType": "c6id.large",
+  "Location": "cac1-az2"
+ },
+ {
+  "InstanceType": "c6id.metal",
+  "Location": "cac1-az2"
+ },
+ {
+  "InstanceType": "c6id.xlarge",
+  "Location": "cac1-az2"
+ },
  {
   "InstanceType": "c6in.12xlarge",
   "Location": "cac1-az2"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone-id/sa-east-1.json b/moto/ec2/resources/instance_type_offerings/availability-zone-id/sa-east-1.json
index 5c36eb08a..36207b666 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone-id/sa-east-1.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone-id/sa-east-1.json
@@ -399,6 +399,46 @@
   "InstanceType": "c6i.xlarge",
   "Location": "sae1-az1"
  },
+ {
+  "InstanceType": "c6id.12xlarge",
+  "Location": "sae1-az1"
+ },
+ {
+  "InstanceType": "c6id.16xlarge",
+  "Location": "sae1-az1"
+ },
+ {
+  "InstanceType": "c6id.24xlarge",
+  "Location": "sae1-az1"
+ },
+ {
+  "InstanceType": "c6id.2xlarge",
+  "Location": "sae1-az1"
+ },
+ {
+  "InstanceType": "c6id.32xlarge",
+  "Location": "sae1-az1"
+ },
+ {
+  "InstanceType": "c6id.4xlarge",
+  "Location": "sae1-az1"
+ },
+ {
+  "InstanceType": "c6id.8xlarge",
+  "Location": "sae1-az1"
+ },
+ {
+  "InstanceType": "c6id.large",
+  "Location": "sae1-az1"
+ },
+ {
+  "InstanceType": "c6id.metal",
+  "Location": "sae1-az1"
+ },
+ {
+  "InstanceType": "c6id.xlarge",
+  "Location": "sae1-az1"
+ },
  {
   "InstanceType": "c6in.12xlarge",
   "Location": "sae1-az1"
@@ -3707,6 +3747,46 @@
   "InstanceType": "c6i.xlarge",
   "Location": "sae1-az3"
  },
+ {
+  "InstanceType": "c6id.12xlarge",
+  "Location": "sae1-az3"
+ },
+ {
+  "InstanceType": "c6id.16xlarge",
+  "Location": "sae1-az3"
+ },
+ {
+  "InstanceType": "c6id.24xlarge",
+  "Location": "sae1-az3"
+ },
+ {
+  "InstanceType": "c6id.2xlarge",
+  "Location": "sae1-az3"
+ },
+ {
+  "InstanceType": "c6id.32xlarge",
+  "Location": "sae1-az3"
+ },
+ {
+  "InstanceType": "c6id.4xlarge",
+  "Location": "sae1-az3"
+ },
+ {
+  "InstanceType": "c6id.8xlarge",
+  "Location": "sae1-az3"
+ },
+ {
+  "InstanceType": "c6id.large",
+  "Location": "sae1-az3"
+ },
+ {
+  "InstanceType": "c6id.metal",
+  "Location": "sae1-az3"
+ },
+ {
+  "InstanceType": "c6id.xlarge",
+  "Location": "sae1-az3"
+ },
  {
   "InstanceType": "c6in.12xlarge",
   "Location": "sae1-az3"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone/ca-central-1.json b/moto/ec2/resources/instance_type_offerings/availability-zone/ca-central-1.json
index a509696a1..ad0374f5f 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone/ca-central-1.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone/ca-central-1.json
@@ -339,6 +339,46 @@
   "InstanceType": "c6i.xlarge",
   "Location": "ca-central-1a"
  },
+ {
+  "InstanceType": "c6id.12xlarge",
+  "Location": "ca-central-1a"
+ },
+ {
+  "InstanceType": "c6id.16xlarge",
+  "Location": "ca-central-1a"
+ },
+ {
+  "InstanceType": "c6id.24xlarge",
+  "Location": "ca-central-1a"
+ },
+ {
+  "InstanceType": "c6id.2xlarge",
+  "Location": "ca-central-1a"
+ },
+ {
+  "InstanceType": "c6id.32xlarge",
+  "Location": "ca-central-1a"
+ },
+ {
+  "InstanceType": "c6id.4xlarge",
+  "Location": "ca-central-1a"
+ },
+ {
+  "InstanceType": "c6id.8xlarge",
+  "Location": "ca-central-1a"
+ },
+ {
+  "InstanceType": "c6id.large",
+  "Location": "ca-central-1a"
+ },
+ {
+  "InstanceType": "c6id.metal",
+  "Location": "ca-central-1a"
+ },
+ {
+  "InstanceType": "c6id.xlarge",
+  "Location": "ca-central-1a"
+ },
  {
   "InstanceType": "c6in.12xlarge",
   "Location": "ca-central-1a"
@@ -2207,6 +2247,46 @@
   "InstanceType": "c6i.xlarge",
   "Location": "ca-central-1b"
  },
+ {
+  "InstanceType": "c6id.12xlarge",
+  "Location": "ca-central-1b"
+ },
+ {
+  "InstanceType": "c6id.16xlarge",
+  "Location": "ca-central-1b"
+ },
+ {
+  "InstanceType": "c6id.24xlarge",
+  "Location": "ca-central-1b"
+ },
+ {
+  "InstanceType": "c6id.2xlarge",
+  "Location": "ca-central-1b"
+ },
+ {
+  "InstanceType": "c6id.32xlarge",
+  "Location": "ca-central-1b"
+ },
+ {
+  "InstanceType": "c6id.4xlarge",
+  "Location": "ca-central-1b"
+ },
+ {
+  "InstanceType": "c6id.8xlarge",
+  "Location": "ca-central-1b"
+ },
+ {
+  "InstanceType": "c6id.large",
+  "Location": "ca-central-1b"
+ },
+ {
+  "InstanceType": "c6id.metal",
+  "Location": "ca-central-1b"
+ },
+ {
+  "InstanceType": "c6id.xlarge",
+  "Location": "ca-central-1b"
+ },
  {
   "InstanceType": "c6in.12xlarge",
   "Location": "ca-central-1b"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone/sa-east-1.json b/moto/ec2/resources/instance_type_offerings/availability-zone/sa-east-1.json
index 85540da41..eca8cf5ea 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone/sa-east-1.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone/sa-east-1.json
@@ -399,6 +399,46 @@
   "InstanceType": "c6i.xlarge",
   "Location": "sa-east-1a"
  },
+ {
+  "InstanceType": "c6id.12xlarge",
+  "Location": "sa-east-1a"
+ },
+ {
+  "InstanceType": "c6id.16xlarge",
+  "Location": "sa-east-1a"
+ },
+ {
+  "InstanceType": "c6id.24xlarge",
+  "Location": "sa-east-1a"
+ },
+ {
+  "InstanceType": "c6id.2xlarge",
+  "Location": "sa-east-1a"
+ },
+ {
+  "InstanceType": "c6id.32xlarge",
+  "Location": "sa-east-1a"
+ },
+ {
+  "InstanceType": "c6id.4xlarge",
+  "Location": "sa-east-1a"
+ },
+ {
+  "InstanceType": "c6id.8xlarge",
+  "Location": "sa-east-1a"
+ },
+ {
+  "InstanceType": "c6id.large",
+  "Location": "sa-east-1a"
+ },
+ {
+  "InstanceType": "c6id.metal",
+  "Location": "sa-east-1a"
+ },
+ {
+  "InstanceType": "c6id.xlarge",
+  "Location": "sa-east-1a"
+ },
  {
   "InstanceType": "c6in.12xlarge",
   "Location": "sa-east-1a"
@@ -3707,6 +3747,46 @@
   "InstanceType": "c6i.xlarge",
   "Location": "sa-east-1c"
  },
+ {
+  "InstanceType": "c6id.12xlarge",
+  "Location": "sa-east-1c"
+ },
+ {
+  "InstanceType": "c6id.16xlarge",
+  "Location": "sa-east-1c"
+ },
+ {
+  "InstanceType": "c6id.24xlarge",
+  "Location": "sa-east-1c"
+ },
+ {
+  "InstanceType": "c6id.2xlarge",
+  "Location": "sa-east-1c"
+ },
+ {
+  "InstanceType": "c6id.32xlarge",
+  "Location": "sa-east-1c"
+ },
+ {
+  "InstanceType": "c6id.4xlarge",
+  "Location": "sa-east-1c"
+ },
+ {
+  "InstanceType": "c6id.8xlarge",
+  "Location": "sa-east-1c"
+ },
+ {
+  "InstanceType": "c6id.large",
+  "Location": "sa-east-1c"
+ },
+ {
+  "InstanceType": "c6id.metal",
+  "Location": "sa-east-1c"
+ },
+ {
+  "InstanceType": "c6id.xlarge",
+  "Location": "sa-east-1c"
+ },
  {
   "InstanceType": "c6in.12xlarge",
   "Location": "sa-east-1c"
diff --git a/moto/ec2/resources/instance_type_offerings/region/ca-central-1.json b/moto/ec2/resources/instance_type_offerings/region/ca-central-1.json
index 4cd7c5f96..dc6eda134 100644
--- a/moto/ec2/resources/instance_type_offerings/region/ca-central-1.json
+++ b/moto/ec2/resources/instance_type_offerings/region/ca-central-1.json
@@ -339,6 +339,46 @@
   "InstanceType": "c6i.xlarge",
   "Location": "ca-central-1"
  },
+ {
+  "InstanceType": "c6id.12xlarge",
+  "Location": "ca-central-1"
+ },
+ {
+  "InstanceType": "c6id.16xlarge",
+  "Location": "ca-central-1"
+ },
+ {
+  "InstanceType": "c6id.24xlarge",
+  "Location": "ca-central-1"
+ },
+ {
+  "InstanceType": "c6id.2xlarge",
+  "Location": "ca-central-1"
+ },
+ {
+  "InstanceType": "c6id.32xlarge",
+  "Location": "ca-central-1"
+ },
+ {
+  "InstanceType": "c6id.4xlarge",
+  "Location": "ca-central-1"
+ },
+ {
+  "InstanceType": "c6id.8xlarge",
+  "Location": "ca-central-1"
+ },
+ {
+  "InstanceType": "c6id.large",
+  "Location": "ca-central-1"
+ },
+ {
+  "InstanceType": "c6id.metal",
+  "Location": "ca-central-1"
+ },
+ {
+  "InstanceType": "c6id.xlarge",
+  "Location": "ca-central-1"
+ },
  {
   "InstanceType": "c6in.12xlarge",
   "Location": "ca-central-1"
diff --git a/moto/ec2/resources/instance_type_offerings/region/sa-east-1.json b/moto/ec2/resources/instance_type_offerings/region/sa-east-1.json
index 7e12447bd..07e93833b 100644
--- a/moto/ec2/resources/instance_type_offerings/region/sa-east-1.json
+++ b/moto/ec2/resources/instance_type_offerings/region/sa-east-1.json
@@ -399,6 +399,46 @@
   "InstanceType": "c6i.xlarge",
   "Location": "sa-east-1"
  },
+ {
+  "InstanceType": "c6id.12xlarge",
+  "Location": "sa-east-1"
+ },
+ {
+  "InstanceType": "c6id.16xlarge",
+  "Location": "sa-east-1"
+ },
+ {
+  "InstanceType": "c6id.24xlarge",
+  "Location": "sa-east-1"
+ },
+ {
+  "InstanceType": "c6id.2xlarge",
+  "Location": "sa-east-1"
+ },
+ {
+  "InstanceType": "c6id.32xlarge",
+  "Location": "sa-east-1"
+ },
+ {
+  "InstanceType": "c6id.4xlarge",
+  "Location": "sa-east-1"
+ },
+ {
+  "InstanceType": "c6id.8xlarge",
+  "Location": "sa-east-1"
+ },
+ {
+  "InstanceType": "c6id.large",
+  "Location": "sa-east-1"
+ },
+ {
+  "InstanceType": "c6id.metal",
+  "Location": "sa-east-1"
+ },
+ {
+  "InstanceType": "c6id.xlarge",
+  "Location": "sa-east-1"
+ },
  {
   "InstanceType": "c6in.12xlarge",
   "Location": "sa-east-1"
diff --git a/moto/rds/models.py b/moto/rds/models.py
index 217b4089c..40acb891e 100644
--- a/moto/rds/models.py
+++ b/moto/rds/models.py
@@ -247,6 +247,31 @@ class Cluster:
             )
         self.backup_retention_period = kwargs.get("backup_retention_period") or 1
 
+        if backtrack := kwargs.get("backtrack_window"):
+            if self.engine == "aurora-mysql":
+                # https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html
+                if 0 <= backtrack <= 259200:
+                    self.backtrack_window: int = backtrack
+                else:
+                    raise InvalidParameterValue(
+                        f"The specified value ({backtrack}) is not a valid Backtrack Window. "
+                        "Allowed values are within the range of 0 to 259200"
+                    )
+            else:
+                raise InvalidParameterValue(
+                    "Backtrack is not enabled for the postgres engine."
+                )
+        else:
+            self.backtrack_window = 0
+
+        self.iam_auth: bool = False
+        if auth := kwargs.get("enable_iam_database_authentication", False):
+            if not self.engine.startswith("aurora-"):
+                raise InvalidParameterCombination(
+                    "IAM Authentication is currently not supported by Multi-AZ DB clusters."
+                )
+            self.iam_auth = auth
+
     @property
     def is_multi_az(self) -> bool:
         return (
@@ -330,7 +355,7 @@ class Cluster:
               {% endfor %}
               </AvailabilityZones>
               <BackupRetentionPeriod>{{ cluster.backup_retention_period }}</BackupRetentionPeriod>
-              <BacktrackWindow>0</BacktrackWindow>
+              <BacktrackWindow>{{ cluster.backtrack_window }}</BacktrackWindow>
               <DBInstanceStatus>{{ cluster.status }}</DBInstanceStatus>
               {% if cluster.db_name %}<DatabaseName>{{ cluster.db_name }}</DatabaseName>{% endif %}
               {% if cluster.kms_key_id %}<KmsKeyId>{{ cluster.kms_key_id }}</KmsKeyId>{% endif %}
@@ -384,7 +409,7 @@ class Cluster:
               <DbClusterResourceId>{{ cluster.resource_id }}</DbClusterResourceId>
               <DBClusterArn>{{ cluster.db_cluster_arn }}</DBClusterArn>
               <AssociatedRoles></AssociatedRoles>
-              <IAMDatabaseAuthenticationEnabled>false</IAMDatabaseAuthenticationEnabled>
+              <IAMDatabaseAuthenticationEnabled>{{ cluster.iam_auth | string | lower }}</IAMDatabaseAuthenticationEnabled>
               <EngineMode>{{ cluster.engine_mode }}</EngineMode>
               <DeletionProtection>{{ 'true' if cluster.deletion_protection else 'false' }}</DeletionProtection>
               <HttpEndpointEnabled>{{ 'true' if cluster.enable_http_endpoint else 'false' }}</HttpEndpointEnabled>
@@ -592,7 +617,7 @@ class Database(CloudFormationModel):
         self.replicas: List[str] = []
         self.account_id: str = kwargs["account_id"]
         self.region_name: str = kwargs["region"]
-        self.engine = kwargs.get("engine")
+        self.engine: str = kwargs["engine"]
         if self.engine not in DbInstanceEngine.valid_db_instance_engine():
             raise InvalidParameterValue(
                 f"Value {self.engine} for parameter Engine is invalid. Reason: engine {self.engine} not supported"
diff --git a/moto/rds/responses.py b/moto/rds/responses.py
index 4ea10cff7..c573ad656 100644
--- a/moto/rds/responses.py
+++ b/moto/rds/responses.py
@@ -97,6 +97,7 @@ class RDSResponse(BaseResponse):
             "allocated_storage": self._get_int_param("AllocatedStorage"),
             "availability_zone": self._get_param("AvailabilityZone"),
             "backup_retention_period": self._get_param("BackupRetentionPeriod"),
+            "backtrack_window": self._get_param("BacktrackWindow"),
             "copy_tags_to_snapshot": self._get_param("CopyTagsToSnapshot"),
             "db_instance_class": self._get_param("DBInstanceClass"),
             "db_cluster_identifier": self._get_param("DBClusterIdentifier"),
@@ -184,7 +185,11 @@ class RDSResponse(BaseResponse):
             "availability_zones": self._get_multi_param(
                 "AvailabilityZones.AvailabilityZone"
             ),
+            "backtrack_window": self._get_int_param("BacktrackWindow"),
             "enable_cloudwatch_logs_exports": params.get("EnableCloudwatchLogsExports"),
+            "enable_iam_database_authentication": self._get_bool_param(
+                "EnableIAMDatabaseAuthentication"
+            ),
             "db_name": self._get_param("DatabaseName"),
             "db_cluster_identifier": self._get_param("DBClusterIdentifier"),
             "db_subnet_group_name": self._get_param("DBSubnetGroupName"),


Test patch:
diff --git a/tests/test_rds/test_rds_clusters.py b/tests/test_rds/test_rds_clusters.py
index 00554c2b0..a5a59fd7e 100644
--- a/tests/test_rds/test_rds_clusters.py
+++ b/tests/test_rds/test_rds_clusters.py
@@ -249,6 +249,7 @@ def test_create_db_cluster_additional_parameters():
             "MaxCapacity": 4,
         },
         VpcSecurityGroupIds=["sg1", "sg2"],
+        EnableIAMDatabaseAuthentication=True,
     )
 
     cluster = resp["DBCluster"]
@@ -276,6 +277,7 @@ def test_create_db_cluster_additional_parameters():
     assert len(security_groups) == 2
     assert {"VpcSecurityGroupId": "sg1", "Status": "active"} in security_groups
     assert {"VpcSecurityGroupId": "sg2", "Status": "active"} in security_groups
+    assert cluster["IAMDatabaseAuthenticationEnabled"] is True
 
 
 @mock_aws
@@ -1100,3 +1102,71 @@ def test_modify_db_cluster_snapshot_attribute():
     assert resp["DBClusterSnapshotAttributesResult"]["DBClusterSnapshotAttributes"][0][
         "AttributeValues"
     ] == ["test2"]
+
+
+@mock_aws
+def test_backtrack_window():
+    client = boto3.client("rds", region_name=RDS_REGION)
+    window = 86400
+    resp = client.create_db_cluster(
+        AvailabilityZones=["eu-north-1b"],
+        DatabaseName="users",
+        DBClusterIdentifier="cluster-id",
+        Engine="aurora-mysql",
+        EngineVersion="8.0.mysql_aurora.3.01.0",
+        MasterUsername="root",
+        MasterUserPassword="hunter2_",
+        Port=1234,
+        DeletionProtection=True,
+        EnableCloudwatchLogsExports=["audit"],
+        NetworkType="IPV4",
+        DBSubnetGroupName="subnetgroupname",
+        StorageEncrypted=True,
+        VpcSecurityGroupIds=["sg1", "sg2"],
+        BacktrackWindow=window,
+    )
+
+    assert resp["DBCluster"]["BacktrackWindow"] == window
+
+
+@mock_aws
+@pytest.mark.parametrize(
+    "params",
+    [
+        (
+            "aurora-mysql",
+            -1,
+            "The specified value (-1) is not a valid Backtrack Window. Allowed values are within the range of 0 to 259200",
+        ),
+        (
+            "aurora-mysql",
+            10000000,
+            "The specified value (10000000) is not a valid Backtrack Window. Allowed values are within the range of 0 to 259200",
+        ),
+        (
+            "aurora-postgresql",
+            20,
+            "Backtrack is not enabled for the postgres engine.",
+        ),
+    ],
+)
+def test_backtrack_errors(params):
+    client = boto3.client("rds", region_name=RDS_REGION)
+
+    with pytest.raises(ClientError) as ex:
+        client.create_db_cluster(
+            AvailabilityZones=["eu-north-1b"],
+            DatabaseName="users",
+            DBClusterIdentifier="cluster-id",
+            Engine=params[0],
+            EngineVersion="8.0.mysql_aurora.3.01.0",
+            MasterUsername="root",
+            MasterUserPassword="hunter2_",
+            DBSubnetGroupName="subnetgroupname",
+            StorageEncrypted=True,
+            VpcSecurityGroupIds=["sg1", "sg2"],
+            BacktrackWindow=params[1],
+        )
+    err = ex.value.response["Error"]
+    assert err["Code"] == "InvalidParameterValue"
+    assert err["Message"] == params[2]