@jaypie/constructs 1.1.44 → 1.1.46
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/cjs/JaypieLambda.d.ts +1 -2
- package/dist/cjs/JaypieQueuedLambda.d.ts +1 -0
- package/dist/cjs/index.cjs +10 -8
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/JaypieLambda.d.ts +1 -2
- package/dist/esm/JaypieQueuedLambda.d.ts +1 -0
- package/dist/esm/index.js +10 -8
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -11,7 +11,6 @@ export interface JaypieLambdaProps {
|
|
|
11
11
|
allowPublicSubnet?: boolean;
|
|
12
12
|
architecture?: lambda.Architecture;
|
|
13
13
|
code: lambda.Code | string;
|
|
14
|
-
codeSigningConfig?: lambda.ICodeSigningConfig;
|
|
15
14
|
datadogApiKeyArn?: string;
|
|
16
15
|
deadLetterQueue?: import("aws-cdk-lib/aws-sqs").IQueue;
|
|
17
16
|
deadLetterQueueEnabled?: boolean;
|
|
@@ -20,7 +19,6 @@ export interface JaypieLambdaProps {
|
|
|
20
19
|
environment?: {
|
|
21
20
|
[key: string]: string;
|
|
22
21
|
};
|
|
23
|
-
environmentEncryption?: import("aws-cdk-lib/aws-kms").IKey;
|
|
24
22
|
envSecrets?: {
|
|
25
23
|
[key: string]: secretsmanager.ISecret;
|
|
26
24
|
};
|
|
@@ -75,6 +73,7 @@ export declare class JaypieLambda extends Construct implements lambda.IFunction
|
|
|
75
73
|
get latestVersion(): lambda.IVersion;
|
|
76
74
|
get permissionsNode(): import("constructs").Node;
|
|
77
75
|
get resourceArnsForGrantInvoke(): string[];
|
|
76
|
+
get functionRef(): lambda.FunctionRef;
|
|
78
77
|
addEventSource(source: lambda.IEventSource): void;
|
|
79
78
|
addEventSourceMapping(id: string, options: lambda.EventSourceMappingOptions): lambda.EventSourceMapping;
|
|
80
79
|
addFunctionUrl(options?: lambda.FunctionUrlOptions): lambda.FunctionUrl;
|
|
@@ -27,6 +27,7 @@ export declare class JaypieQueuedLambda extends Construct implements lambda.IFun
|
|
|
27
27
|
get latestVersion(): lambda.IVersion;
|
|
28
28
|
get permissionsNode(): import("constructs").Node;
|
|
29
29
|
get resourceArnsForGrantInvoke(): string[];
|
|
30
|
+
get functionRef(): lambda.FunctionRef;
|
|
30
31
|
addEventSource(source: lambda.IEventSource): void;
|
|
31
32
|
addEventSourceMapping(id: string, options: lambda.EventSourceMappingOptions): lambda.EventSourceMapping;
|
|
32
33
|
addFunctionUrl(options?: lambda.FunctionUrlOptions): lambda.FunctionUrl;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -76,8 +76,8 @@ function addDatadogLayers(lambdaFunction, options = {}) {
|
|
|
76
76
|
Object.entries(datadogEnvVars).forEach(([key, value]) => {
|
|
77
77
|
lambdaFunction.addEnvironment(key, value);
|
|
78
78
|
});
|
|
79
|
-
const datadogApiKeySecret = secretsmanager__namespace.Secret.fromSecretNameV2(lambdaFunction
|
|
80
|
-
const datadogLambda = new datadogCdkConstructsV2.DatadogLambda(lambdaFunction
|
|
79
|
+
const datadogApiKeySecret = secretsmanager__namespace.Secret.fromSecretNameV2(lambdaFunction, "DatadogApiKey", resolvedDatadogApiKeyArn);
|
|
80
|
+
const datadogLambda = new datadogCdkConstructsV2.DatadogLambda(lambdaFunction, "DatadogLambda", {
|
|
81
81
|
apiKeySecret: datadogApiKeySecret, // apiKeySecret auto-grants secret access to the added lambdas
|
|
82
82
|
nodeLayerVersion: cdk.CDK.DATADOG.LAYER.NODE,
|
|
83
83
|
extensionLayerVersion: cdk.CDK.DATADOG.LAYER.EXTENSION,
|
|
@@ -478,7 +478,7 @@ class JaypieAppStack extends JaypieStack {
|
|
|
478
478
|
class JaypieLambda extends constructs.Construct {
|
|
479
479
|
constructor(scope, id, props) {
|
|
480
480
|
super(scope, id);
|
|
481
|
-
const { allowAllOutbound, allowPublicSubnet, architecture = lambda__namespace.Architecture.X86_64, code,
|
|
481
|
+
const { allowAllOutbound, allowPublicSubnet, architecture = lambda__namespace.Architecture.X86_64, code, datadogApiKeyArn, deadLetterQueue, deadLetterQueueEnabled, deadLetterTopic, description, environment: initialEnvironment = {}, envSecrets = {}, ephemeralStorageSize, filesystem, handler = "index.handler", initialPolicy, layers = [], logRetention = cdk.CDK.LAMBDA.LOG_RETENTION, logRetentionRole, logRetentionRetryOptions, maxEventAge, memorySize = cdk.CDK.LAMBDA.MEMORY_SIZE, paramsAndSecrets, paramsAndSecretsOptions, profiling, profilingGroup, provisionedConcurrentExecutions, reservedConcurrentExecutions, retryAttempts, roleTag = cdk.CDK.ROLE.PROCESSING, runtime = lambda__namespace.Runtime.NODEJS_22_X, runtimeManagementMode, secrets = [], securityGroups, timeout = cdk$1.Duration.seconds(cdk.CDK.DURATION.LAMBDA_WORKER), tracing, vendorTag, vpc, vpcSubnets, } = props;
|
|
482
482
|
// Get base environment with defaults
|
|
483
483
|
const environment = jaypieLambdaEnv({ initialEnvironment });
|
|
484
484
|
const codeAsset = typeof code === "string" ? lambda__namespace.Code.fromAsset(code) : code;
|
|
@@ -509,7 +509,6 @@ class JaypieLambda extends constructs.Construct {
|
|
|
509
509
|
allowPublicSubnet,
|
|
510
510
|
architecture,
|
|
511
511
|
code: codeAsset,
|
|
512
|
-
codeSigningConfig,
|
|
513
512
|
deadLetterQueue,
|
|
514
513
|
deadLetterQueueEnabled,
|
|
515
514
|
deadLetterTopic,
|
|
@@ -519,7 +518,6 @@ class JaypieLambda extends constructs.Construct {
|
|
|
519
518
|
...secretsEnvironment,
|
|
520
519
|
...jaypieSecretsEnvironment,
|
|
521
520
|
},
|
|
522
|
-
environmentEncryption,
|
|
523
521
|
ephemeralStorageSize,
|
|
524
522
|
filesystem,
|
|
525
523
|
handler,
|
|
@@ -624,6 +622,9 @@ class JaypieLambda extends constructs.Construct {
|
|
|
624
622
|
get resourceArnsForGrantInvoke() {
|
|
625
623
|
return this._reference.resourceArnsForGrantInvoke;
|
|
626
624
|
}
|
|
625
|
+
get functionRef() {
|
|
626
|
+
return this._reference.functionRef;
|
|
627
|
+
}
|
|
627
628
|
addEventSource(source) {
|
|
628
629
|
this._reference.addEventSource(source);
|
|
629
630
|
}
|
|
@@ -692,7 +693,7 @@ class JaypieLambda extends constructs.Construct {
|
|
|
692
693
|
class JaypieQueuedLambda extends constructs.Construct {
|
|
693
694
|
constructor(scope, id, props) {
|
|
694
695
|
super(scope, id);
|
|
695
|
-
const { allowAllOutbound, allowPublicSubnet, architecture, batchSize = 1, code,
|
|
696
|
+
const { allowAllOutbound, allowPublicSubnet, architecture, batchSize = 1, code, datadogApiKeyArn, deadLetterQueue, deadLetterQueueEnabled, deadLetterTopic, description, environment = {}, envSecrets = {}, ephemeralStorageSize, fifo = true, filesystem, handler = "index.handler", initialPolicy, layers = [], logRetention = cdk.CDK.LAMBDA.LOG_RETENTION, logRetentionRole, logRetentionRetryOptions, maxEventAge, memorySize = cdk.CDK.LAMBDA.MEMORY_SIZE, paramsAndSecrets, paramsAndSecretsOptions, profiling, profilingGroup, provisionedConcurrentExecutions, reservedConcurrentExecutions, retryAttempts, roleTag, runtime = lambda__namespace.Runtime.NODEJS_22_X, runtimeManagementMode, secrets = [], securityGroups, timeout = cdk$1.Duration.seconds(cdk.CDK.DURATION.LAMBDA_WORKER), tracing, vendorTag, visibilityTimeout = cdk$1.Duration.seconds(cdk.CDK.DURATION.LAMBDA_WORKER), vpc, vpcSubnets, } = props;
|
|
696
697
|
// Create SQS Queue
|
|
697
698
|
this._queue = new sqs__namespace.Queue(this, "Queue", {
|
|
698
699
|
fifo,
|
|
@@ -712,7 +713,6 @@ class JaypieQueuedLambda extends constructs.Construct {
|
|
|
712
713
|
allowPublicSubnet,
|
|
713
714
|
architecture,
|
|
714
715
|
code,
|
|
715
|
-
codeSigningConfig,
|
|
716
716
|
datadogApiKeyArn,
|
|
717
717
|
deadLetterQueue,
|
|
718
718
|
deadLetterQueueEnabled,
|
|
@@ -722,7 +722,6 @@ class JaypieQueuedLambda extends constructs.Construct {
|
|
|
722
722
|
...environment,
|
|
723
723
|
CDK_ENV_QUEUE_URL: this._queue.queueUrl,
|
|
724
724
|
},
|
|
725
|
-
environmentEncryption,
|
|
726
725
|
envSecrets,
|
|
727
726
|
ephemeralStorageSize,
|
|
728
727
|
filesystem,
|
|
@@ -797,6 +796,9 @@ class JaypieQueuedLambda extends constructs.Construct {
|
|
|
797
796
|
get resourceArnsForGrantInvoke() {
|
|
798
797
|
return this._lambdaConstruct.resourceArnsForGrantInvoke;
|
|
799
798
|
}
|
|
799
|
+
get functionRef() {
|
|
800
|
+
return this._lambdaConstruct.functionRef;
|
|
801
|
+
}
|
|
800
802
|
addEventSource(source) {
|
|
801
803
|
this._lambdaConstruct.addEventSource(source);
|
|
802
804
|
}
|