Skip to content

Commit 7f45981

Browse files
Fix some values and increase cert expiry from 14 to 30
1 parent e6cd9b5 commit 7f45981

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

infrastructure/terraform/components/api/module_authorizer_lambda.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module "authorizer_lambda" {
3636

3737
lambda_env_vars = {
3838
CLOUDWATCH_NAMESPACE = "/aws/api-gateway/supplier/alarms",
39-
CLIENT_CERTIFICATE_EXPIRATION_ALERT_DAYS = 14,
39+
CLIENT_CERTIFICATE_EXPIRATION_ALERT_DAYS = 30,
4040
APIM_SUPPLIER_ID_HEADER = "NHSD-Supplier-ID",
4141
SUPPLIERS_TABLE_NAME = aws_dynamodb_table.suppliers.name
4242
}

infrastructure/terraform/modules/alarms/alarms-lambda/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "aws_cloudwatch_metric_alarm" "errors" {
22
alarm_name = "${var.alarm_prefix}-lambda-${var.function_name}-errors"
3-
alarm_description = "RELIABILITY: Lambda errors"
3+
alarm_description = "ERROR: Lambda errors"
44

55
namespace = "AWS/Lambda"
66
metric_name = "Errors"
@@ -60,7 +60,7 @@ resource "aws_cloudwatch_log_metric_filter" "error_logs" {
6060
resource "aws_cloudwatch_metric_alarm" "error_logs" {
6161
count = var.enable_error_log_metric ? 1 : 0
6262
alarm_name = "${var.alarm_prefix}-lambda-${var.function_name}-error-logs"
63-
alarm_description = "RELIABILITY: Lambda error logs detected"
63+
alarm_description = "ERROR: Lambda error logs detected"
6464

6565
namespace = var.error_log_metric_namespace
6666
metric_name = "${var.error_log_metric_name_prefix}${var.function_name}"

infrastructure/terraform/modules/alarms/alarms-lambda/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ variable "error_log_metric_name_prefix" {
5353

5454
variable "error_log_metric_filter_pattern" {
5555
type = string
56-
default = "?ERROR ?Error ?Exception"
56+
default = "{ ($.level = \"50\" || $.level = \"error\") && $.environment = * }"
5757
}
5858

5959
variable "error_log_threshold" {

infrastructure/terraform/modules/alarms/alarms-sqs/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ variable "age_period_seconds" {
2323

2424
variable "age_anomaly_sensitivity" {
2525
type = number
26-
default = 2
26+
default = 3
2727
}
2828

2929
variable "age_anomaly_evaluation_periods" {

lambdas/authorizer/src/__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const mockedDeps: jest.Mocked<Deps> = {
1313
logger: { info: jest.fn(), error: jest.fn() } as unknown as pino.Logger,
1414
env: {
1515
CLOUDWATCH_NAMESPACE: "cloudwatch-namespace",
16-
CLIENT_CERTIFICATE_EXPIRATION_ALERT_DAYS: 14,
16+
CLIENT_CERTIFICATE_EXPIRATION_ALERT_DAYS: 30,
1717
APIM_SUPPLIER_ID_HEADER: "NHSD-Supplier-ID",
1818
} as unknown as EnvVars,
1919
supplierRepo: {

0 commit comments

Comments
 (0)