Skip to content

Commit

Permalink
Add runtimeManagementMode
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsola-guardian committed May 16, 2024
1 parent 8267b07 commit 828ad4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cdk/lib/__snapshots__/monitoring.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ exports[`The Monitoring stack matches the snapshot 1`] = `
],
},
"Runtime": "nodejs18.x",
"RuntimeManagementConfig": {
"RuntimeVersionArn": "0cdcfbdefbc5e7d3343f73c2e2dd3cba17d61dea0686b404502a0c9ce83931b9",
"UpdateRuntimeOn": "Manual",
},
"Tags": [
{
"Key": "App",
Expand Down
3 changes: 2 additions & 1 deletion cdk/lib/monitoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { SnsAction } from 'aws-cdk-lib/aws-cloudwatch-actions';
import { Rule, RuleTargetInput, Schedule } from 'aws-cdk-lib/aws-events';
import { LambdaFunction } from 'aws-cdk-lib/aws-events-targets';
import { Effect, PolicyStatement } from 'aws-cdk-lib/aws-iam';
import { Runtime } from 'aws-cdk-lib/aws-lambda';
import { Runtime, RuntimeManagementMode } from 'aws-cdk-lib/aws-lambda';
import { Topic } from 'aws-cdk-lib/aws-sns';
import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';

Expand Down Expand Up @@ -47,6 +47,7 @@ export class Monitoring extends GuStack {
fileName: `${lambdaBaseName}-lambda-${region}.zip`,
handler: 'index.handler',
runtime: Runtime.NODEJS_18_X,
runtimeManagementMode: RuntimeManagementMode.manual("0cdcfbdefbc5e7d3343f73c2e2dd3cba17d61dea0686b404502a0c9ce83931b9"),
timeout: Duration.seconds(300),
memorySize: 2048,
initialPolicy: [policyStatement],
Expand Down

1 comment on commit 828ad4b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 91.04% 254/279
🟢 Branches 81.67% 98/120
🟢 Functions 88.57% 62/70
🟢 Lines 90.74% 245/270

Test suite run success

331 tests passing in 16 suites.

Report generated by 🧪jest coverage report action from 828ad4b

Please sign in to comment.