Skip to content

Commit

Permalink
Created LAMBDA_RUNTIME_ID secret
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsola-guardian committed May 21, 2024
1 parent 0512199 commit bb067dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/monitoring-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ jobs:
- name: CDK Synth
working-directory: './cdk'
run: yarn synth
env:
LAMBDA_RUNTIME_ID: ${{ secrets.LAMBDA_RUNTIME_ID }}

- name: ZIP Lambda files
working-directory: './cdk'
Expand Down
4 changes: 3 additions & 1 deletion cdk/lib/monitoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export class Monitoring extends GuStack {

const lambdaBaseName = 'cmp-monitoring';

const runTimeId = process.env.LAMBDA_RUNTIME_ID;

const prodDurationInMinutes = 2;

const policyStatement = new PolicyStatement({
Expand All @@ -38,7 +40,7 @@ export class Monitoring extends GuStack {
resources: ['*'],
});

const runTimeManagementArn = `arn:aws:lambda:${region}::runtime:0cdcfbdefbc5e7d3343f73c2e2dd3cba17d61dea0686b404502a0c9ce83931b9`
const runTimeManagementArn = `arn:aws:lambda:${region}::runtime:${runTimeId}`

const monitoringLambdaFunction = new GuLambdaFunction(
this,
Expand Down

1 comment on commit bb067dd

@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 bb067dd

Please sign in to comment.