Skip to content

(rds): Add support for DB2 in Amazon RDS #28485

@cedricmillet

Description

@cedricmillet

Describe the feature

Last month (27, Nov 2023) we announced the general availability of Amazon RDS for DB2. The purpose of this issue is to update DatabaseInstance (+ DatabaseInstanceEngine and related classes/interfaces) and add support for RDS with DB2.

Currently 2 versions are handled :

  • db2-se-11-5 = DB2 Standard Edition v11.5
  • db2-ae-11.5 = DB2 Advanced Edition v11.5

AWS RDS for DB2 official home page

Use Case

Use the AWS CDK to create a RDS Instance with DB2 engine. At the moment the only way to create a DB2 instance is to use CfnInstance with the right engine / engineVersion attributes pair. We also need to provide a CfnDBParameterGroup with a valid IBM license since only the BYOL (Bring Your Own License) mode is supported.

const cfnDBParameterGroup = new CfnDBParameterGroup(
      this,
      `MyParameterGroup`,
      {
        description: 'Intended to store IBM DB2 Licence',
        family: 'db2-se-11.5', // Full list with: aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" --engine db2-se
        dbParameterGroupName: `db-param-group-db2-ibm-licence`,
        parameters: {
          ['rds.ibm_customer_id']: 'YOUR_IBM_CUSTOMER_ID',
          ['rds.ibm_site_id']: 'YOUR_IBM_SITE_ID'
        }
      }
    );

const databaseInstance = new CfnDBInstance(this, `${id}Db2Instance`, {
      dbInstanceClass: 'db.m6i.large', // Minimal instance class for DB2 in AWS console
      engine: 'db2-se',
      engineVersion: '11.5',
      licenseModel: LicenseModel.BRING_YOUR_OWN_LICENSE,
      dbParameterGroupName: cfnDBParameterGroup.dbParameterGroupName,
      // ... other attributes (vpc, storage, dbName, master username/password...)
});

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.116.1

Environment details (OS name and version, etc.)

Any environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-rdsRelated to Amazon Relational Databaseeffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions