in lib/qldb-blog-db-stack.ts [45:72]
constructor(scope: cdk.Construct, id: string, props: QldbBlogDbStackProps) {
super(scope, id, props);
// Create source QLDB Ledger. Please note in production, we normally would set deletionProtection to true in the lines below.
this.qldbLedger = new qldb.CfnLedger(this, 'QldbBlogLedger', {
name: props.qldbLedgerName,
permissionsMode: 'ALLOW_ALL',
});
// Create the destination QLDB instance.
this.qldbLedgerStreaming = new qldb.CfnLedger(this, 'QldbBlogLedgerStreaming', {
name: props.destQldbLedgerName,
permissionsMode: 'ALLOW_ALL',
});
// Create CloudFormation output.
new cdk.CfnOutput(this, 'QldbLedgerId', {
value: this.qldbLedger.ref,
description: 'Qldb Ledger ID',
});
new cdk.CfnOutput(this, 'QldbLedgerStreamingId', {
value: this.qldbLedgerStreaming.ref,
description: 'Destination Qldb Ledger ID',
});
};