@emarketeer/ts-microservice-commons 8.1.0 → 8.1.1
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.
- package/dist/cdk/cjs/index.js +11 -2
- package/dist/cdk/cjs/index.js.map +1 -1
- package/dist/cdk/index.js +12 -3
- package/dist/cdk/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cdk/cjs/index.js
CHANGED
|
@@ -837,7 +837,9 @@ class EmDynamoDBTable extends constructs.Construct {
|
|
|
837
837
|
partitionKey: config.partitionKey,
|
|
838
838
|
sortKey: config.sortKey,
|
|
839
839
|
billingMode: config.billingMode || awsDynamodb.BillingMode.PAY_PER_REQUEST,
|
|
840
|
-
|
|
840
|
+
pointInTimeRecoverySpecification: {
|
|
841
|
+
pointInTimeRecoveryEnabled: config.pointInTimeRecovery ?? config.stage === 'prod'
|
|
842
|
+
},
|
|
841
843
|
deletionProtection: config.deletionProtection ?? config.stage === 'prod',
|
|
842
844
|
stream: config.stream ? awsDynamodb.StreamViewType.NEW_AND_OLD_IMAGES : undefined,
|
|
843
845
|
timeToLiveAttribute: config.timeToLiveAttribute,
|
|
@@ -2404,7 +2406,14 @@ function createRdsVpcConfig(scope, stage, config) {
|
|
|
2404
2406
|
const vpc = ec2.Vpc.fromLookup(scope, `RdsVpc-${stage}`, {
|
|
2405
2407
|
vpcId: config.vpcId
|
|
2406
2408
|
});
|
|
2407
|
-
|
|
2409
|
+
// The imported subnets are only handed to Lambda's VpcConfig. We never read
|
|
2410
|
+
// `subnet.routeTable.routeTableId`, so acknowledge the CDK warning that
|
|
2411
|
+
// `fromSubnetId` emits for imports without route-table metadata.
|
|
2412
|
+
const privateSubnets = config.privateSubnetIds.map((subnetId, index) => {
|
|
2413
|
+
const subnet = ec2.Subnet.fromSubnetId(scope, `RdsPrivateSubnet${index}-${stage}`, subnetId);
|
|
2414
|
+
cdk.Annotations.of(subnet).acknowledgeWarning('@aws-cdk/aws-ec2:noSubnetRouteTableId', 'This construct only passes imported subnets to Lambda VpcConfig and does not require routeTableId metadata.');
|
|
2415
|
+
return subnet;
|
|
2416
|
+
});
|
|
2408
2417
|
const lambdaSecurityGroup = new ec2.SecurityGroup(scope, `RdsLambdaSecurityGroup-${stage}`, {
|
|
2409
2418
|
vpc,
|
|
2410
2419
|
description: config.securityGroupDescription ?? 'Lambda security group for RDS access',
|