Skip to content

Commit 3b31922

Browse files
committed
[ELI-702] - adding the new signing resources and attaching to lambda
1 parent 61cc4ac commit 3b31922

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

infrastructure/modules/lambda/lambda.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ resource "aws_lambda_function" "eligibility_signposting_lambda" {
1111

1212
source_code_hash = filebase64sha256(var.file_name)
1313

14+
code_signing_config_arn = aws_lambda_code_signing_config.signing_config.arn
15+
1416
runtime = var.runtime
1517
timeout = 30
1618
memory_size = 2048
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
resource "aws_signer_signing_profile" "lambda_signing" {
2+
name_prefix = "eligibility-signing-"
3+
4+
platform_id = "AWSLambda-SHA384-ECDSA"
5+
6+
signature_validity_period {
7+
value = 365
8+
type = "DAYS"
9+
}
10+
}
11+
12+
resource "aws_lambda_code_signing_config" "signing_config" {
13+
allowed_publishers {
14+
signing_profile_version_arns = [
15+
aws_signer_signing_profile.lambda_signing.version_arn
16+
]
17+
}
18+
19+
policies {
20+
untrusted_artifact_on_deployment = "Enforce"
21+
}
22+
23+
description = "Only allow Lambda bundles signed by our trusted signer profile"
24+
}

0 commit comments

Comments
 (0)