# DatabaseInstanceNewProps

Construction properties for a DatabaseInstanceNew.

- Source: [`aws-rds/lib/instance.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-rds/lib/instance.ts#L469)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_logs as logs } from 'aws-cdk-lib';
import { aws_rds as rds } from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';
import { aws_iam as interfaces_iam } from 'aws-cdk-lib/interfaces';
import { aws_kms as interfaces_kms } from 'aws-cdk-lib/interfaces';
import { aws_rds as interfaces_rds } from 'aws-cdk-lib/interfaces';

declare const bucket: s3.Bucket;
declare const caCertificate: rds.CaCertificate;
declare const dBSubnetGroupRef: interfaces_rds.IDBSubnetGroupRef;
declare const keyRef: interfaces_kms.IKeyRef;
declare const optionGroup: rds.OptionGroup;
declare const parameterGroup: rds.ParameterGroup;
declare const role: iam.Role;
declare const roleRef: interfaces_iam.IRoleRef;
declare const securityGroup: ec2.SecurityGroup;
declare const subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const vpc: ec2.Vpc;
const databaseInstanceNewProps: rds.DatabaseInstanceNewProps = {
  vpc: vpc,

  // the properties below are optional
  applyImmediately: false,
  autoMinorVersionUpgrade: false,
  availabilityZone: 'availabilityZone',
  backupRetention: cdk.Duration.minutes(30),
  caCertificate: caCertificate,
  cloudwatchLogsExports: ['cloudwatchLogsExports'],
  cloudwatchLogsRetention: logs.RetentionDays.ONE_DAY,
  cloudwatchLogsRetentionRole: role,
  copyTagsToSnapshot: false,
  databaseInsightsMode: rds.DatabaseInsightsMode.STANDARD,
  deleteAutomatedBackups: false,
  deletionProtection: false,
  domain: 'domain',
  domainRole: roleRef,
  enablePerformanceInsights: false,
  engineLifecycleSupport: rds.EngineLifecycleSupport.OPEN_SOURCE_RDS_EXTENDED_SUPPORT,
  iamAuthentication: false,
  instanceIdentifier: 'instanceIdentifier',
  iops: 123,
  maxAllocatedStorage: 123,
  monitoringInterval: cdk.Duration.minutes(30),
  monitoringRole: roleRef,
  multiAz: false,
  networkType: rds.NetworkType.IPV4,
  optionGroup: optionGroup,
  parameterGroup: parameterGroup,
  performanceInsightEncryptionKey: keyRef,
  performanceInsightRetention: rds.PerformanceInsightRetention.DEFAULT,
  port: 123,
  preferredBackupWindow: 'preferredBackupWindow',
  preferredMaintenanceWindow: 'preferredMaintenanceWindow',
  processorFeatures: {
    coreCount: 123,
    threadsPerCore: 123,
  },
  publiclyAccessible: false,
  removalPolicy: cdk.RemovalPolicy.DESTROY,
  s3ExportBuckets: [bucket],
  s3ExportRole: role,
  s3ImportBuckets: [bucket],
  s3ImportRole: role,
  securityGroups: [securityGroup],
  storageThroughput: 123,
  storageType: rds.StorageType.STANDARD,
  subnetGroup: dBSubnetGroupRef,
  vpcSubnets: {
    availabilityZones: ['availabilityZones'],
    onePerAz: false,
    subnetFilters: [subnetFilter],
    subnetGroupName: 'subnetGroupName',
    subnets: [subnet],
    subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
  },
};
```

## Properties

- `applyImmediately`: boolean — Specifies whether changes to the DB instance and any pending modifications are applied immediately, regardless of the `preferredMaintenanceWindow` setting.

  **Default:** Changes will be applied immediately

  If set to `false`, changes are applied during the next maintenance window.

  Until RDS applies the changes, the DB instance remains in a drift state.
  As a result, the configuration doesn't fully reflect the requested modifications and temporarily diverges from the intended state.

  This property also determines whether the DB instance reboots when a static parameter is modified in the associated DB parameter group.

- `autoMinorVersionUpgrade`: boolean = true — Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.

- `availabilityZone`: string — The name of the Availability Zone where the DB instance will be located.

  **Default:** no preference

- `backupRetention`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — The number of days during which automatic DB snapshots are retained.

  **Default:** Duration.days(1) for source instances, disabled for read replicas

  Set to zero to disable backups.
  When creating a read replica, you must enable automatic backups on the source
  database instance by setting the backup retention to a value other than zero.

- `caCertificate`: [CaCertificate](/cdk/api/v2/docs/aws-cdk-lib.aws_rds.CaCertificate.html) — The identifier of the CA certificate for this DB instance.

  **Default:** RDS will choose a certificate authority

  Specifying or updating this property triggers a reboot.

  For RDS DB engines:

- `cloudwatchLogsExports`: string[] — The list of log types that need to be enabled for exporting to CloudWatch Logs.

  **Default:** no log exports

- `cloudwatchLogsRetention`: [RetentionDays](/cdk/api/v2/docs/aws-cdk-lib.aws_logs.RetentionDays.html) — The number of days log events are kept in CloudWatch Logs.

  **Default:** logs never expire

  When updating
  this property, unsetting it doesn't remove the log retention policy. To
  remove the retention policy, set the value to `Infinity`.

- `cloudwatchLogsRetentionRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The IAM role for the Lambda function associated with the custom resource that sets the retention policy.

  **Default:** a new role is created.

- `copyTagsToSnapshot`: boolean = true — Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance.

- `databaseInsightsMode`: [DatabaseInsightsMode](/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseInsightsMode.html) — The database insights mode.

  **Default:** DatabaseInsightsMode.STANDARD when performance insights are enabled, otherwise not set.

- `deleteAutomatedBackups`: boolean = true — Indicates whether automated backups should be deleted or retained when you delete a DB instance.

- `deletionProtection`: boolean — Indicates whether the DB instance should have deletion protection enabled.

  **Default:** true if ``removalPolicy`` is RETAIN, false otherwise

- `domain`: string — The Active Directory directory ID to create the DB instance in.

  **Default:** Do not join domain

- `domainRole`: [IRoleRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.IRoleRef.html) — The IAM role to be used when making API calls to the Directory Service.

  **Default:** The role will be created for you if `DatabaseInstanceNewProps#domain` is specified

  The role needs the AWS-managed policy
  AmazonRDSDirectoryServiceAccess or equivalent.

- `enablePerformanceInsights`: boolean — Whether to enable Performance Insights for the DB instance.

  **Default:** false, unless ``performanceInsightRetention`` or ``performanceInsightEncryptionKey`` is set.

- `engineLifecycleSupport`: [EngineLifecycleSupport](/cdk/api/v2/docs/aws-cdk-lib.aws_rds.EngineLifecycleSupport.html) — The life cycle type for this DB instance.

  **Default:** undefined - AWS RDS default setting is `EngineLifecycleSupport.OPEN_SOURCE_RDS_EXTENDED_SUPPORT`

  This setting applies only to RDS for MySQL and RDS for PostgreSQL.

- `iamAuthentication`: boolean = false — Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.

- `instanceIdentifier`: string — A name for the DB instance.

  **Default:** a CloudFormation generated name

  If you specify a name, AWS CloudFormation
  converts it to lowercase.

- `iops`: number — The number of I/O operations per second (IOPS) that the database provisions.

  **Default:** no provisioned iops if storage type is not specified. For GP3: 3,000 IOPS if allocated storage is less than 400 GiB for MariaDB, MySQL, and PostgreSQL, less than 200 GiB for Oracle and less than 20 GiB for SQL Server. 12,000 IOPS otherwise (except for SQL Server where the default is always 3,000 IOPS).

  The value must be equal to or greater than 1000.

- `maxAllocatedStorage`: number — Upper limit to which RDS can scale the storage in GiB(Gibibyte).

  **Default:** No autoscaling of RDS instance

- `monitoringInterval`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance.

  **Default:** no enhanced monitoring

- `monitoringRole`: [IRoleRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.IRoleRef.html) — Role that will be used to manage DB instance monitoring.

  **Default:** A role is automatically created for you

- `multiAz`: boolean = false — Specifies if the database instance is a multiple Availability Zone deployment.

- `networkType`: [NetworkType](/cdk/api/v2/docs/aws-cdk-lib.aws_rds.NetworkType.html) = IPV4 — The network type of the DB instance.

- `optionGroup`: [IOptionGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_rds.IOptionGroup.html) — The option group to associate with the instance.

  **Default:** no option group

- `parameterGroup`: [IParameterGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_rds.IParameterGroup.html) — The DB parameter group to associate with the instance.

  **Default:** no parameter group

- `performanceInsightEncryptionKey`: [IKeyRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_kms.IKeyRef.html) — The AWS KMS key for encryption of Performance Insights data.

  **Default:** default master key

- `performanceInsightRetention`: [PerformanceInsightRetention](/cdk/api/v2/docs/aws-cdk-lib.aws_rds.PerformanceInsightRetention.html) — The amount of time, in days, to retain Performance Insights data.

  **Default:** 7 this is the free tier

  If you set `databaseInsightsMode` to `DatabaseInsightsMode.ADVANCED`, you must set this property to `PerformanceInsightRetention.MONTHS_15`.

- `port`: number — The port for the instance.

  **Default:** the default port for the chosen engine.

- `preferredBackupWindow`: string — The daily time range during which automated backups are performed.

  **Default:** a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow

  Constraints:
  - Must be in the format `hh24:mi-hh24:mi`.
  - Must be in Universal Coordinated Time (UTC).
  - Must not conflict with the preferred maintenance window.
  - Must be at least 30 minutes.

- `preferredMaintenanceWindow`: string — The weekly time range (in UTC) during which system maintenance can occur.

  **Default:** a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance

  Format: `ddd:hh24:mi-ddd:hh24:mi`
  Constraint: Minimum 30-minute window

- `processorFeatures`: [ProcessorFeatures](/cdk/api/v2/docs/aws-cdk-lib.aws_rds.ProcessorFeatures.html) — The number of CPU cores and the number of threads per core.

  **Default:** the default number of CPU cores and threads per core for the chosen instance class. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor

- `publiclyAccessible`: boolean — Indicates whether the DB instance is an internet-facing instance.

  **Default:** `true` if the instance's `vpcSubnets` is `subnetType: SubnetType.PUBLIC`, `false` otherwise

  If not specified,
  the instance's vpcSubnets will be used to determine if the instance is internet-facing
  or not.

- `removalPolicy`: [RemovalPolicy](/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) — The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.

  **Default:** RemovalPolicy.SNAPSHOT (remove the resource, but retain a snapshot of the data)

- `s3ExportBuckets`: [IBucket](/cdk/api/v2/docs/aws-cdk-lib.aws_s3.IBucket.html)[] = None — S3 buckets that you want to load data into.

  This property must not be used if `s3ExportRole` is used.

  For Microsoft SQL Server:

- `s3ExportRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — Role that will be associated with this DB instance to enable S3 export.

  **Default:** New role is created if `s3ExportBuckets` is set, no role is defined otherwise

  This property must not be used if `s3ExportBuckets` is used.

  For Microsoft SQL Server:

- `s3ImportBuckets`: [IBucket](/cdk/api/v2/docs/aws-cdk-lib.aws_s3.IBucket.html)[] = None — S3 buckets that you want to load data from.

  This feature is only supported by the Microsoft SQL Server, Oracle, and PostgreSQL engines.

  This property must not be used if `s3ImportRole` is used.

  For Microsoft SQL Server:

- `s3ImportRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — Role that will be associated with this DB instance to enable S3 import.

  **Default:** New role is created if `s3ImportBuckets` is set, no role is defined otherwise

  This feature is only supported by the Microsoft SQL Server, Oracle, and PostgreSQL engines.

  This property must not be used if `s3ImportBuckets` is used.

  For Microsoft SQL Server:

- `securityGroups`: [ISecurityGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISecurityGroup.html)[] — The security groups to assign to the DB instance.

  **Default:** a new security group is created

- `storageThroughput`: number — The storage throughput, specified in mebibytes per second (MiBps).

  **Default:** 125 MiBps if allocated storage is less than 400 GiB for MariaDB, MySQL, and PostgreSQL, less than 200 GiB for Oracle and less than 20 GiB for SQL Server. 500 MiBps otherwise (except for SQL Server where the default is always 125 MiBps).

  Only applicable for GP3.

- `storageType`: [StorageType](/cdk/api/v2/docs/aws-cdk-lib.aws_rds.StorageType.html) = StorageType.GP2 — The storage type to associate with the DB instance.

  Storage types supported are gp2, gp3, io1, io2, and standard.

- `subnetGroup`: [IDBSubnetGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_rds.IDBSubnetGroupRef.html) — Existing subnet group for the instance.

  **Default:** a new subnet group will be created.

- `vpc`: [IVpc](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) (required) — The VPC network where the DB subnet group should be created.

- `vpcSubnets`: [SubnetSelection](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html) — The type of subnets to add to the created DB subnet group.

  **Default:** private subnets
