in blogs/awsconfig-docdb/lib/functions/cluster-parameter-group-remediation/index.js [31:46]
async function getDbClusterIdentifier(resourceId) {
try {
const {DBClusters: clusters} = await docDb.describeDBClusters().promise();
const {DBClusterIdentifier: dbClusterIdentifier} = clusters.find(c => c.DbClusterResourceId === resourceId);
if (!dbClusterIdentifier) {
throw new Error(`Cluster with resourceId=${resourceId} not found`);
}
return dbClusterIdentifier;
} catch (e) {
console.log(e);
throw e;
}
}