@btc-embedded/cdk-extensions 0.22.15 → 0.22.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.jsii +364 -3
  2. package/API.md +385 -0
  3. package/CHANGELOG.md +15 -0
  4. package/README.md +32 -0
  5. package/assets/cli/catnip.js +218 -121
  6. package/lib/constructs/EventPipe.js +1 -1
  7. package/lib/constructs/ExportedService.js +1 -1
  8. package/lib/constructs/S3Bucket.js +1 -1
  9. package/lib/constructs/SecureRestApi.js +1 -1
  10. package/lib/constructs/SecureRestApiV2.js +1 -1
  11. package/lib/constructs/api-keys/ApiKeyClientAuthorization.js +1 -1
  12. package/lib/constructs/api-keys/ApiKeyManagement.js +1 -1
  13. package/lib/constructs/api-keys/ApiKeyPreTokenHandler.js +1 -1
  14. package/lib/constructs/api-keys/ApiKeyStore.js +1 -1
  15. package/lib/extensions/ApiGatewayExtension.js +1 -1
  16. package/lib/extensions/ApplicationContainer.js +1 -1
  17. package/lib/extensions/ApplicationLoadBalancerExtension.js +1 -1
  18. package/lib/extensions/ApplicationLoadBalancerExtensionV2.js +1 -1
  19. package/lib/extensions/CloudMapExtension.js +1 -1
  20. package/lib/extensions/DeactivatableServiceExtension.js +1 -1
  21. package/lib/extensions/DeploymentConfigExtension.js +1 -1
  22. package/lib/extensions/DocumentDbAccessExtension.js +1 -1
  23. package/lib/extensions/DomainEventMessagingExtension.js +1 -1
  24. package/lib/extensions/EfsMountExtension.js +1 -1
  25. package/lib/extensions/ExtraContainerExtension.js +1 -1
  26. package/lib/extensions/HTTPApiExtension.js +1 -1
  27. package/lib/extensions/LogExtension.js +1 -1
  28. package/lib/extensions/ModifyContainerDefinitionExtension.js +1 -1
  29. package/lib/extensions/ModifyTaskDefinitionExtension.js +1 -1
  30. package/lib/extensions/OpenIdExtension.js +1 -1
  31. package/lib/extensions/OpenTelemetryExtension.js +1 -1
  32. package/lib/extensions/PostgresDbAccessExtension.js +1 -1
  33. package/lib/extensions/SharedVolumeExtension.js +1 -1
  34. package/lib/extensions/TcpKeepAliveExtension.js +1 -1
  35. package/lib/platform/ApiGateway.js +1 -1
  36. package/lib/platform/ApiGatewayVpcLink.js +2 -2
  37. package/lib/platform/ApplicationLoadBalancer.js +1 -1
  38. package/lib/platform/ApplicationLoadBalancerV2.js +2 -2
  39. package/lib/platform/AuroraPostgresDB.d.ts +110 -0
  40. package/lib/platform/AuroraPostgresDB.js +144 -0
  41. package/lib/platform/BTCLogGroup.js +1 -1
  42. package/lib/platform/CognitoUserPool.js +2 -2
  43. package/lib/platform/DefaultUserPoolClients.js +1 -1
  44. package/lib/platform/DocumentDB.js +2 -2
  45. package/lib/platform/EcsCluster.js +1 -1
  46. package/lib/platform/EfsFileSystem.js +1 -1
  47. package/lib/platform/HostedZone.js +1 -1
  48. package/lib/platform/PrivateDnsNamespace.js +1 -1
  49. package/lib/platform/ResourceServer.js +1 -1
  50. package/lib/platform/Vpc.js +1 -1
  51. package/lib/platform/VpcV2.js +1 -1
  52. package/lib/platform/index.d.ts +1 -0
  53. package/lib/platform/index.js +2 -1
  54. package/lib/stacks/ApplicationStack.js +1 -1
  55. package/lib/utils/BasePlatformStackResolver.js +1 -1
  56. package/lib/utils/StackParameter.js +1 -1
  57. package/package.json +2 -1
package/API.md CHANGED
@@ -2489,6 +2489,154 @@ Whether termination protection is enabled for this stack.
2489
2489
  ---
2490
2490
 
2491
2491
 
2492
+ ### AuroraPostgresCluster <a name="AuroraPostgresCluster" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster"></a>
2493
+
2494
+ Provisions an Aurora PostgreSQL Serverless v2 cluster and exports connection metadata.
2495
+
2496
+ Exports:
2497
+ - `aurora-postgres-db:secret-arn`
2498
+ - `aurora-postgres-db:credentials-secret-arn`
2499
+ - `aurora-postgres-db:cluster-endpoint`
2500
+ - `aurora-postgres-db:security-group-id`
2501
+ - `aurora-postgres-db:tunnel-instance-id` (only when tunnel host is enabled)
2502
+
2503
+ #### Initializers <a name="Initializers" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster.Initializer"></a>
2504
+
2505
+ ```typescript
2506
+ import { AuroraPostgresCluster } from '@btc-embedded/cdk-extensions'
2507
+
2508
+ new AuroraPostgresCluster(scope: Construct, id: string, props: AuroraPostgresClusterProps)
2509
+ ```
2510
+
2511
+ | **Name** | **Type** | **Description** |
2512
+ | --- | --- | --- |
2513
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresCluster.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
2514
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresCluster.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
2515
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresCluster.Initializer.parameter.props">props</a></code> | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterProps">AuroraPostgresClusterProps</a></code> | *No description.* |
2516
+
2517
+ ---
2518
+
2519
+ ##### `scope`<sup>Required</sup> <a name="scope" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster.Initializer.parameter.scope"></a>
2520
+
2521
+ - *Type:* constructs.Construct
2522
+
2523
+ ---
2524
+
2525
+ ##### `id`<sup>Required</sup> <a name="id" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster.Initializer.parameter.id"></a>
2526
+
2527
+ - *Type:* string
2528
+
2529
+ ---
2530
+
2531
+ ##### `props`<sup>Required</sup> <a name="props" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster.Initializer.parameter.props"></a>
2532
+
2533
+ - *Type:* <a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterProps">AuroraPostgresClusterProps</a>
2534
+
2535
+ ---
2536
+
2537
+ #### Methods <a name="Methods" id="Methods"></a>
2538
+
2539
+ | **Name** | **Description** |
2540
+ | --- | --- |
2541
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresCluster.toString">toString</a></code> | Returns a string representation of this construct. |
2542
+
2543
+ ---
2544
+
2545
+ ##### `toString` <a name="toString" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster.toString"></a>
2546
+
2547
+ ```typescript
2548
+ public toString(): string
2549
+ ```
2550
+
2551
+ Returns a string representation of this construct.
2552
+
2553
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
2554
+
2555
+ | **Name** | **Description** |
2556
+ | --- | --- |
2557
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresCluster.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
2558
+
2559
+ ---
2560
+
2561
+ ##### `isConstruct` <a name="isConstruct" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster.isConstruct"></a>
2562
+
2563
+ ```typescript
2564
+ import { AuroraPostgresCluster } from '@btc-embedded/cdk-extensions'
2565
+
2566
+ AuroraPostgresCluster.isConstruct(x: any)
2567
+ ```
2568
+
2569
+ Checks if `x` is a construct.
2570
+
2571
+ Use this method instead of `instanceof` to properly detect `Construct`
2572
+ instances, even when the construct library is symlinked.
2573
+
2574
+ Explanation: in JavaScript, multiple copies of the `constructs` library on
2575
+ disk are seen as independent, completely different libraries. As a
2576
+ consequence, the class `Construct` in each copy of the `constructs` library
2577
+ is seen as a different class, and an instance of one class will not test as
2578
+ `instanceof` the other class. `npm install` will not create installations
2579
+ like this, but users may manually symlink construct libraries together or
2580
+ use a monorepo tool: in those cases, multiple copies of the `constructs`
2581
+ library can be accidentally installed, and `instanceof` will behave
2582
+ unpredictably. It is safest to avoid using `instanceof`, and using
2583
+ this type-testing method instead.
2584
+
2585
+ ###### `x`<sup>Required</sup> <a name="x" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster.isConstruct.parameter.x"></a>
2586
+
2587
+ - *Type:* any
2588
+
2589
+ Any object.
2590
+
2591
+ ---
2592
+
2593
+ #### Properties <a name="Properties" id="Properties"></a>
2594
+
2595
+ | **Name** | **Type** | **Description** |
2596
+ | --- | --- | --- |
2597
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresCluster.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
2598
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresCluster.property.cluster">cluster</a></code> | <code>aws-cdk-lib.aws_rds.DatabaseCluster</code> | Aurora database cluster. |
2599
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresCluster.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.SecurityGroup</code> | Security group attached to the Aurora cluster. |
2600
+
2601
+ ---
2602
+
2603
+ ##### `node`<sup>Required</sup> <a name="node" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster.property.node"></a>
2604
+
2605
+ ```typescript
2606
+ public readonly node: Node;
2607
+ ```
2608
+
2609
+ - *Type:* constructs.Node
2610
+
2611
+ The tree node.
2612
+
2613
+ ---
2614
+
2615
+ ##### `cluster`<sup>Required</sup> <a name="cluster" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster.property.cluster"></a>
2616
+
2617
+ ```typescript
2618
+ public readonly cluster: DatabaseCluster;
2619
+ ```
2620
+
2621
+ - *Type:* aws-cdk-lib.aws_rds.DatabaseCluster
2622
+
2623
+ Aurora database cluster.
2624
+
2625
+ ---
2626
+
2627
+ ##### `securityGroup`<sup>Required</sup> <a name="securityGroup" id="@btc-embedded/cdk-extensions.AuroraPostgresCluster.property.securityGroup"></a>
2628
+
2629
+ ```typescript
2630
+ public readonly securityGroup: SecurityGroup;
2631
+ ```
2632
+
2633
+ - *Type:* aws-cdk-lib.aws_ec2.SecurityGroup
2634
+
2635
+ Security group attached to the Aurora cluster.
2636
+
2637
+ ---
2638
+
2639
+
2492
2640
  ### BTCLogGroup <a name="BTCLogGroup" id="@btc-embedded/cdk-extensions.BTCLogGroup"></a>
2493
2641
 
2494
2642
  A log group with sensible defaults.
@@ -9233,6 +9381,243 @@ public readonly secret: ISecret;
9233
9381
 
9234
9382
  ---
9235
9383
 
9384
+ ### AuroraPostgresClusterOverrides <a name="AuroraPostgresClusterOverrides" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides"></a>
9385
+
9386
+ Supported override options for Aurora cluster tuning.
9387
+
9388
+ #### Initializer <a name="Initializer" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.Initializer"></a>
9389
+
9390
+ ```typescript
9391
+ import { AuroraPostgresClusterOverrides } from '@btc-embedded/cdk-extensions'
9392
+
9393
+ const auroraPostgresClusterOverrides: AuroraPostgresClusterOverrides = { ... }
9394
+ ```
9395
+
9396
+ #### Properties <a name="Properties" id="Properties"></a>
9397
+
9398
+ | **Name** | **Type** | **Description** |
9399
+ | --- | --- | --- |
9400
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.property.clusterIdentifier">clusterIdentifier</a></code> | <code>string</code> | Optional DB cluster identifier. |
9401
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.property.serverlessV2MaxCapacity">serverlessV2MaxCapacity</a></code> | <code>number</code> | Maximum Aurora Serverless v2 capacity. |
9402
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.property.serverlessV2MinCapacity">serverlessV2MinCapacity</a></code> | <code>number</code> | Minimum Aurora Serverless v2 capacity. |
9403
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.property.storageEncrypted">storageEncrypted</a></code> | <code>boolean</code> | Whether storage encryption should be enabled. |
9404
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.property.vpcSubnets">vpcSubnets</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | Subnets used for cluster instances. |
9405
+
9406
+ ---
9407
+
9408
+ ##### `clusterIdentifier`<sup>Optional</sup> <a name="clusterIdentifier" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.property.clusterIdentifier"></a>
9409
+
9410
+ ```typescript
9411
+ public readonly clusterIdentifier: string;
9412
+ ```
9413
+
9414
+ - *Type:* string
9415
+ - *Default:* generated by CDK
9416
+
9417
+ Optional DB cluster identifier.
9418
+
9419
+ ---
9420
+
9421
+ ##### `serverlessV2MaxCapacity`<sup>Optional</sup> <a name="serverlessV2MaxCapacity" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.property.serverlessV2MaxCapacity"></a>
9422
+
9423
+ ```typescript
9424
+ public readonly serverlessV2MaxCapacity: number;
9425
+ ```
9426
+
9427
+ - *Type:* number
9428
+ - *Default:* 1
9429
+
9430
+ Maximum Aurora Serverless v2 capacity.
9431
+
9432
+ ---
9433
+
9434
+ ##### `serverlessV2MinCapacity`<sup>Optional</sup> <a name="serverlessV2MinCapacity" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.property.serverlessV2MinCapacity"></a>
9435
+
9436
+ ```typescript
9437
+ public readonly serverlessV2MinCapacity: number;
9438
+ ```
9439
+
9440
+ - *Type:* number
9441
+ - *Default:* 0
9442
+
9443
+ Minimum Aurora Serverless v2 capacity.
9444
+
9445
+ ---
9446
+
9447
+ ##### `storageEncrypted`<sup>Optional</sup> <a name="storageEncrypted" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.property.storageEncrypted"></a>
9448
+
9449
+ ```typescript
9450
+ public readonly storageEncrypted: boolean;
9451
+ ```
9452
+
9453
+ - *Type:* boolean
9454
+ - *Default:* true
9455
+
9456
+ Whether storage encryption should be enabled.
9457
+
9458
+ ---
9459
+
9460
+ ##### `vpcSubnets`<sup>Optional</sup> <a name="vpcSubnets" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides.property.vpcSubnets"></a>
9461
+
9462
+ ```typescript
9463
+ public readonly vpcSubnets: SubnetSelection;
9464
+ ```
9465
+
9466
+ - *Type:* aws-cdk-lib.aws_ec2.SubnetSelection
9467
+ - *Default:* SubnetType.PRIVATE_WITH_EGRESS
9468
+
9469
+ Subnets used for cluster instances.
9470
+
9471
+ ---
9472
+
9473
+ ### AuroraPostgresClusterProps <a name="AuroraPostgresClusterProps" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterProps"></a>
9474
+
9475
+ Properties for {@link AuroraPostgresCluster}.
9476
+
9477
+ #### Initializer <a name="Initializer" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterProps.Initializer"></a>
9478
+
9479
+ ```typescript
9480
+ import { AuroraPostgresClusterProps } from '@btc-embedded/cdk-extensions'
9481
+
9482
+ const auroraPostgresClusterProps: AuroraPostgresClusterProps = { ... }
9483
+ ```
9484
+
9485
+ #### Properties <a name="Properties" id="Properties"></a>
9486
+
9487
+ | **Name** | **Type** | **Description** |
9488
+ | --- | --- | --- |
9489
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterProps.property.instanceName">instanceName</a></code> | <code>string</code> | Instance name used for the optional tunnel host. |
9490
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC to deploy the Aurora cluster into. |
9491
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterProps.property.clusterProps">clusterProps</a></code> | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides">AuroraPostgresClusterOverrides</a></code> | Optional Aurora cluster overrides. |
9492
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterProps.property.tunnelHost">tunnelHost</a></code> | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps">AuroraPostgresTunnelHostProps</a></code> | Optional settings for the tunnel host. |
9493
+
9494
+ ---
9495
+
9496
+ ##### `instanceName`<sup>Required</sup> <a name="instanceName" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterProps.property.instanceName"></a>
9497
+
9498
+ ```typescript
9499
+ public readonly instanceName: string;
9500
+ ```
9501
+
9502
+ - *Type:* string
9503
+
9504
+ Instance name used for the optional tunnel host.
9505
+
9506
+ ---
9507
+
9508
+ ##### `vpc`<sup>Required</sup> <a name="vpc" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterProps.property.vpc"></a>
9509
+
9510
+ ```typescript
9511
+ public readonly vpc: IVpc;
9512
+ ```
9513
+
9514
+ - *Type:* aws-cdk-lib.aws_ec2.IVpc
9515
+
9516
+ VPC to deploy the Aurora cluster into.
9517
+
9518
+ ---
9519
+
9520
+ ##### `clusterProps`<sup>Optional</sup> <a name="clusterProps" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterProps.property.clusterProps"></a>
9521
+
9522
+ ```typescript
9523
+ public readonly clusterProps: AuroraPostgresClusterOverrides;
9524
+ ```
9525
+
9526
+ - *Type:* <a href="#@btc-embedded/cdk-extensions.AuroraPostgresClusterOverrides">AuroraPostgresClusterOverrides</a>
9527
+
9528
+ Optional Aurora cluster overrides.
9529
+
9530
+ ---
9531
+
9532
+ ##### `tunnelHost`<sup>Optional</sup> <a name="tunnelHost" id="@btc-embedded/cdk-extensions.AuroraPostgresClusterProps.property.tunnelHost"></a>
9533
+
9534
+ ```typescript
9535
+ public readonly tunnelHost: AuroraPostgresTunnelHostProps;
9536
+ ```
9537
+
9538
+ - *Type:* <a href="#@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps">AuroraPostgresTunnelHostProps</a>
9539
+
9540
+ Optional settings for the tunnel host.
9541
+
9542
+ ---
9543
+
9544
+ ### AuroraPostgresTunnelHostProps <a name="AuroraPostgresTunnelHostProps" id="@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps"></a>
9545
+
9546
+ Optional settings for the SSM-managed tunnel host used by `catnip pg-tunnel`.
9547
+
9548
+ #### Initializer <a name="Initializer" id="@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps.Initializer"></a>
9549
+
9550
+ ```typescript
9551
+ import { AuroraPostgresTunnelHostProps } from '@btc-embedded/cdk-extensions'
9552
+
9553
+ const auroraPostgresTunnelHostProps: AuroraPostgresTunnelHostProps = { ... }
9554
+ ```
9555
+
9556
+ #### Properties <a name="Properties" id="Properties"></a>
9557
+
9558
+ | **Name** | **Type** | **Description** |
9559
+ | --- | --- | --- |
9560
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps.property.createSsmVpcEndpoints">createSsmVpcEndpoints</a></code> | <code>boolean</code> | Whether to create SSM interface endpoints in the VPC (ssm, ssmmessages, ec2messages). |
9561
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps.property.enabled">enabled</a></code> | <code>boolean</code> | Whether a dedicated EC2 tunnel host should be provisioned. |
9562
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps.property.instanceType">instanceType</a></code> | <code>aws-cdk-lib.aws_ec2.InstanceType</code> | Instance type used for the tunnel host. |
9563
+ | <code><a href="#@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps.property.subnetType">subnetType</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetType</code> | Subnet type where the tunnel host will be placed. |
9564
+
9565
+ ---
9566
+
9567
+ ##### `createSsmVpcEndpoints`<sup>Optional</sup> <a name="createSsmVpcEndpoints" id="@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps.property.createSsmVpcEndpoints"></a>
9568
+
9569
+ ```typescript
9570
+ public readonly createSsmVpcEndpoints: boolean;
9571
+ ```
9572
+
9573
+ - *Type:* boolean
9574
+ - *Default:* false
9575
+
9576
+ Whether to create SSM interface endpoints in the VPC (ssm, ssmmessages, ec2messages).
9577
+
9578
+ Useful for environments without NAT internet egress.
9579
+
9580
+ ---
9581
+
9582
+ ##### `enabled`<sup>Optional</sup> <a name="enabled" id="@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps.property.enabled"></a>
9583
+
9584
+ ```typescript
9585
+ public readonly enabled: boolean;
9586
+ ```
9587
+
9588
+ - *Type:* boolean
9589
+ - *Default:* false
9590
+
9591
+ Whether a dedicated EC2 tunnel host should be provisioned.
9592
+
9593
+ ---
9594
+
9595
+ ##### `instanceType`<sup>Optional</sup> <a name="instanceType" id="@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps.property.instanceType"></a>
9596
+
9597
+ ```typescript
9598
+ public readonly instanceType: InstanceType;
9599
+ ```
9600
+
9601
+ - *Type:* aws-cdk-lib.aws_ec2.InstanceType
9602
+ - *Default:* t3.nano
9603
+
9604
+ Instance type used for the tunnel host.
9605
+
9606
+ ---
9607
+
9608
+ ##### `subnetType`<sup>Optional</sup> <a name="subnetType" id="@btc-embedded/cdk-extensions.AuroraPostgresTunnelHostProps.property.subnetType"></a>
9609
+
9610
+ ```typescript
9611
+ public readonly subnetType: SubnetType;
9612
+ ```
9613
+
9614
+ - *Type:* aws-cdk-lib.aws_ec2.SubnetType
9615
+ - *Default:* SubnetType.PRIVATE_WITH_EGRESS
9616
+
9617
+ Subnet type where the tunnel host will be placed.
9618
+
9619
+ ---
9620
+
9236
9621
  ### BTCLogGroupLookupOptions <a name="BTCLogGroupLookupOptions" id="@btc-embedded/cdk-extensions.BTCLogGroupLookupOptions"></a>
9237
9622
 
9238
9623
  #### Initializer <a name="Initializer" id="@btc-embedded/cdk-extensions.BTCLogGroupLookupOptions.Initializer"></a>
package/CHANGELOG.md CHANGED
@@ -1,4 +1,19 @@
1
1
 
2
+ ## [0.22.16](https://github.com/btc-embedded/cdk-extensions/compare/v0.22.15...v0.22.16) (2026-02-27)
3
+
4
+
5
+ ### Features
6
+
7
+ * **catnip:** add pg-tunnel command and Aurora tunnel host support ([9d6856b](https://github.com/btc-embedded/cdk-extensions/commit/9d6856bfebeedc75c9435e2d8f3bd6cc9d01dd7a))
8
+ * **catnip:** use sdk-backed ssm tunnel lifecycle for pg-tunnel ([23fcc2a](https://github.com/btc-embedded/cdk-extensions/commit/23fcc2a3da487ed75342f5e0147d1a2093db55a1))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **catnip:** harden pg-tunnel runtime lifecycle and portability ([f15985b](https://github.com/btc-embedded/cdk-extensions/commit/f15985b9f999576e011727acf9bcc2befb61d187))
14
+
15
+ ## [0.22.15](https://github.com/btc-embedded/cdk-extensions/compare/v0.22.14...v0.22.15) (2026-02-27)
16
+
2
17
  ## [0.22.14](https://github.com/btc-embedded/cdk-extensions/compare/v0.22.13...v0.22.14) (2026-02-26)
3
18
 
4
19
 
package/README.md CHANGED
@@ -139,6 +139,38 @@ Options:
139
139
  - `--output <token|json>` — print token only, or full response JSON (default: `token`)
140
140
  - `token` output is the `access_token`
141
141
 
142
+ #### pg-tunnel
143
+
144
+ Open a secure Session Manager tunnel to Aurora PostgreSQL and launch a local client.
145
+
146
+ Usage:
147
+
148
+ ```bash
149
+ catnip pg-tunnel --stack-name my-stack
150
+ catnip pg-tunnel --stack-name my-stack --exec "psql"
151
+ catnip pg-tunnel --stack-name my-stack --database app
152
+ catnip pg-tunnel --stack-name my-stack --no-auto-launch
153
+ catnip pg-tunnel --stage prod
154
+ ```
155
+
156
+ Options:
157
+ - `--stack-name <name>` — stack where the Aurora cluster is deployed (typically the base platform stack; optional when auto-discovery works)
158
+ - `--stage <name>` — stage filter used during stack auto-discovery
159
+ - `--local-port <port>` — preferred local port (default: `5432`)
160
+ - `--database <name>` — overrides `PGDATABASE` for launched client/shell
161
+ - `--exec <command>` — explicit command to run after tunnel starts
162
+ - `--no-auto-launch` — keep tunnel attached without launching a client/shell
163
+ - `--tunnel-instance-id <id>` — fallback EC2 instance ID when stack export is missing
164
+
165
+ Database selection behavior:
166
+ - if `--database` is provided, that value is used
167
+ - if omitted, `catnip` infers database names from deployed ECS service task definitions (`POSTGRES_DATABASE`)
168
+ - if exactly one database is inferred, it is applied as `PGDATABASE`
169
+ - if multiple databases are inferred, they are printed with source stack/service and `PGDATABASE` remains unset
170
+
171
+ Prerequisite:
172
+ - `session-manager-plugin` must be installed and available in `PATH`
173
+
142
174
  ## Documentation
143
175
 
144
176
  - [API Reference](./API.md)