-
Notifications
You must be signed in to change notification settings - Fork 647
Closed
Labels
bugThis issue is a bug.This issue is a bug.
Description
Describe the bug
When calling CreateDBClusterCommand with a set of input, the AWS SDK RDS middleware throws an error saying Source identifier key not set.
Your environment
SDK version number
@aws-sdk/client-rds@3.29.0
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the browser/Node.js/ReactNative version
Lambda Node.js 14.x
Steps to reproduce
const input = {
"AvailabilityZones": [
"us-east-1b",
"us-east-1c",
"us-east-1d"
],
"BackupRetentionPeriod": 15,
"CopyTagsToSnapshot": true,
"DBClusterParameterGroupName": "xxxx",
"DBSubnetGroupName": "xxxx",
"DeletionProtection": true,
"EnableIAMDatabaseAuthentication": true,
"EngineVersion": "5.7.mysql_aurora.2.10.0",
"Engine": "aurora-mysql",
"KmsKeyId": "xxxx",
"MasterUsername": "xxxx",
"PreferredBackupWindow": "01:00-03:00",
"PreferredMaintenanceWindow": "sun:06:00-sun:07:00 UTC",
"StorageEncrypted": true,
"VpcSecurityGroupIds": [
"xxxx"
],
"Tags": [],
"MasterUserPassword": "xxxx",
"DBClusterIdentifier": "test-api-prod-db-cluster",
"DatabaseName": "test_api"
};
const client = new RDSClient({region: 'us-east-1'});
const command = new CreateDBClusterCommand(input);
await client.send(command);Observed behavior
Throws error saying Source identifier key not set
Expected behavior
Cluster should be created subject to IAM permissions.
Screenshots
Adding random value to SourceDBSnapshotIdentifier returns expected behaviour

Additional context
Adding any random value to one of the key mentioned at (node_modules/@aws-sdk/middleware-sdk-rds/src/index.ts) makes the validation pass through.
const sourceIds: string[] = [
"SourceDBSnapshotIdentifier",
"SourceDBInstanceIdentifier",
"ReplicationSourceIdentifier",
"SourceDBClusterSnapshotIdentifier",
"SourceDBInstanceArn",
];Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.
