File tree Expand file tree Collapse file tree
lambdas/authorizer/src/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 11resource "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" {
6060resource "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 } "
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ variable "error_log_metric_name_prefix" {
5353
5454variable "error_log_metric_filter_pattern" {
5555 type = string
56- default = " ?ERROR ?Error ?Exception "
56+ default = " { ($.level = \" 50 \" || $.level = \" error \" ) && $.environment = * } "
5757}
5858
5959variable "error_log_threshold" {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ variable "age_period_seconds" {
2323
2424variable "age_anomaly_sensitivity" {
2525 type = number
26- default = 2
26+ default = 3
2727}
2828
2929variable "age_anomaly_evaluation_periods" {
Original file line number Diff line number Diff 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 : {
You can’t perform that action at this time.
0 commit comments