Skip to content

Commit

Permalink
fix: allow Lambda function config overrides without Lambda: property …
Browse files Browse the repository at this point in the history
…- regenerate snapshots
  • Loading branch information
eoinsha committed Jan 22, 2024
1 parent a76755c commit 4c3beea
Show file tree
Hide file tree
Showing 3 changed files with 773 additions and 325 deletions.
Expand Up @@ -784,7 +784,7 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": {
"Fn::Sub": [
Expand Down Expand Up @@ -822,7 +822,7 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": {
"Fn::Sub": [
Expand Down Expand Up @@ -856,11 +856,49 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-
},
"Type": "AWS::CloudWatch::Alarm"
},
"slicWatchLambdaInvocationsAlarmAlbEventLambdaFunction": {
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": {
"Fn::Sub": [
"Total invocations for \${AlbEventLambdaFunction} breaches 10",
{}
]
},
"AlarmName": {
"Fn::Sub": [
"Lambda_Invocations_\${AlbEventLambdaFunction}",
{}
]
},
"ComparisonOperator": "GreaterThanThreshold",
"Dimensions": [
{
"Name": "FunctionName",
"Value": {
"Ref": "AlbEventLambdaFunction"
}
}
],
"EvaluationPeriods": 1,
"MetricName": "Invocations",
"Namespace": "AWS/Lambda",
"OKActions": [],
"Period": 60,
"Statistic": "Sum",
"Threshold": 10,
"TreatMissingData": "notBreaching"
},
"Type": "AWS::CloudWatch::Alarm"
},
"slicWatchLambdaThrottlesAlarmAlbEventLambdaFunction": {
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": {
"Fn::Sub": [
Expand Down Expand Up @@ -934,7 +972,7 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": "LoadBalancer HTTPCodeELB5XXCount Sum for alb breaches 0",
"AlarmName": "LoadBalancer_HTTPCodeELB5XXCountAlarm_alb",
Expand Down Expand Up @@ -965,7 +1003,7 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": "LoadBalancer HTTPCode_Target_5XX_Count Sum for AlbEventAlbTargetGrouphttpListener breaches 0",
"AlarmName": "LoadBalancer_HTTPCodeTarget5XXCountAlarm_AlbEventAlbTargetGrouphttpListener",
Expand Down Expand Up @@ -1005,7 +1043,7 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": "LoadBalancer LambdaInternalError Sum for AlbEventAlbTargetGrouphttpListener breaches 0",
"AlarmName": "LoadBalancer_LambdaInternalErrorAlarm_AlbEventAlbTargetGrouphttpListener",
Expand Down Expand Up @@ -1045,7 +1083,7 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": "LoadBalancer LambdaUserError Sum for AlbEventAlbTargetGrouphttpListener breaches 0",
"AlarmName": "LoadBalancer_LambdaUserErrorAlarm_AlbEventAlbTargetGrouphttpListener",
Expand Down Expand Up @@ -1085,7 +1123,7 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": "LoadBalancer RejectedConnectionCount Sum for alb breaches 0",
"AlarmName": "LoadBalancer_RejectedConnectionCountAlarm_alb",
Expand Down Expand Up @@ -1116,7 +1154,7 @@ exports[`serverless-test-project-alb/tests/snapshot/serverless-test-project-alb-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": "LoadBalancer UnHealthyHostCount Average for AlbEventAlbTargetGrouphttpListener breaches 0",
"AlarmName": "LoadBalancer_UnHealthyHostCountAlarm_AlbEventAlbTargetGrouphttpListener",
Expand Down
Expand Up @@ -524,7 +524,7 @@ exports[`serverless-test-project-appsync/tests/snapshot/serverless-test-project-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": "AppSync 5XXError Sum for awesome-appsync breaches 0",
"AlarmName": "AppSync_5XXErrorAlarm_awesome-appsync",
Expand Down Expand Up @@ -555,7 +555,7 @@ exports[`serverless-test-project-appsync/tests/snapshot/serverless-test-project-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": "AppSync Latency Average for awesome-appsync breaches 0",
"AlarmName": "AppSync_LatencyAlarm_awesome-appsync",
Expand Down Expand Up @@ -768,7 +768,7 @@ exports[`serverless-test-project-appsync/tests/snapshot/serverless-test-project-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": {
"Fn::Sub": [
Expand Down Expand Up @@ -806,7 +806,7 @@ exports[`serverless-test-project-appsync/tests/snapshot/serverless-test-project-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": {
"Fn::Sub": [
Expand Down Expand Up @@ -844,7 +844,7 @@ exports[`serverless-test-project-appsync/tests/snapshot/serverless-test-project-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": {
"Fn::Sub": [
Expand Down Expand Up @@ -882,7 +882,7 @@ exports[`serverless-test-project-appsync/tests/snapshot/serverless-test-project-
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
"test-topic"
"\${env:ALARM_TOPIC}"
],
"AlarmDescription": {
"Fn::Sub": [
Expand Down

0 comments on commit 4c3beea

Please sign in to comment.