(rds): Add support for DB2 in Amazon RDS
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### 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](https://aws.amazon.com/rds/db2/)
### 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](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnInstance.html) 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
- [X] 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
Contributor guide
Research direction
Start by reading the existing DatabaseInstance, DatabaseInstanceEngine, and related classes/interfaces that define supported RDS engines. Verify how the high-level API represents engine and version pairs, then add coverage showing that DB2 Standard Edition 11.5 and Advanced Edition 11.5 can be used with the required BYOL license model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100