Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ lazy val liveactivities = lambda("liveactivities", "liveactivities", Some("com.g
"com.squareup.okhttp3" % "okhttp" % okHttpVersion,
"software.amazon.awssdk" % "dynamodb" % awsSdk2Version,
"software.amazon.awssdk" % "eventbridge" % "2.20.162",
"software.amazon.awssdk" % "cloudwatch" % awsSdk2Version,
"com.amazonaws" % "aws-lambda-java-events" % "3.11.0",
"org.scanamo" %% "scanamo" % "6.0.0",
"org.scanamo" %% "scanamo-testkit" % "6.0.0" % "test"
Expand Down
294 changes: 294 additions & 0 deletions cdk/lib/__snapshots__/liveactivities.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ exports[`The LiveActivities stack matches the snapshot for CODE 1`] = `
"GuLambdaFunction",
"GuAlarm",
"GuLambdaFunction",
"GuAlarm",
"GuAlarm",
"GuAlarm",
],
"gu:cdk:version": "TEST",
},
Expand Down Expand Up @@ -386,6 +389,282 @@ exports[`The LiveActivities stack matches the snapshot for CODE 1`] = `
},
"Type": "AWS::Lambda::Permission",
},
"liveactivitiesapnserrorsbroadcastalarm24C2C924": {
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
{
"Fn::Join": [
"",
[
"arn:aws:sns:",
{
"Ref": "AWS::Region",
},
":",
{
"Ref": "AWS::AccountId",
},
":mobile-server-side",
],
],
},
],
"AlarmDescription": "APNS returned 4xx/5xx responses from the broadcast lambda",
"AlarmName": "liveactivities-apns-errors-broadcast-CODE",
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
"EvaluationPeriods": 1,
"Metrics": [
{
"Expression": "apns4xx + apns5xx",
"Id": "expr_1",
"Label": "APNS 4xx + 5xx",
"ReturnData": true,
},
{
"Id": "apns4xx",
"MetricStat": {
"Metric": {
"Dimensions": [
{
"Name": "Outcome",
"Value": "4xx",
},
],
"MetricName": "ApnsResponse",
"Namespace": "Notifications/CODE/liveactivities-broadcast",
},
"Period": 300,
"Stat": "Sum",
},
"ReturnData": false,
},
{
"Id": "apns5xx",
"MetricStat": {
"Metric": {
"Dimensions": [
{
"Name": "Outcome",
"Value": "5xx",
},
],
"MetricName": "ApnsResponse",
"Namespace": "Notifications/CODE/liveactivities-broadcast",
},
"Period": 300,
"Stat": "Sum",
},
"ReturnData": false,
},
],
"Tags": [
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
{
"Key": "gu:repo",
"Value": "guardian/mobile-n10n",
},
{
"Key": "Stack",
"Value": "mobile-notifications",
},
{
"Key": "Stage",
"Value": "CODE",
},
],
"Threshold": 1,
"TreatMissingData": "notBreaching",
},
"Type": "AWS::CloudWatch::Alarm",
},
"liveactivitiesapnserrorschannelcleaneralarm213AECC3": {
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
{
"Fn::Join": [
"",
[
"arn:aws:sns:",
{
"Ref": "AWS::Region",
},
":",
{
"Ref": "AWS::AccountId",
},
":mobile-server-side",
],
],
},
],
"AlarmDescription": "APNS returned 4xx/5xx responses from the channel-cleaner lambda",
"AlarmName": "liveactivities-apns-errors-channel-cleaner-CODE",
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
"EvaluationPeriods": 1,
"Metrics": [
{
"Expression": "apns4xx + apns5xx",
"Id": "expr_1",
"Label": "APNS 4xx + 5xx",
"ReturnData": true,
},
{
"Id": "apns4xx",
"MetricStat": {
"Metric": {
"Dimensions": [
{
"Name": "Outcome",
"Value": "4xx",
},
],
"MetricName": "ApnsResponse",
"Namespace": "Notifications/CODE/liveactivities-channel-cleaner",
},
"Period": 300,
"Stat": "Sum",
},
"ReturnData": false,
},
{
"Id": "apns5xx",
"MetricStat": {
"Metric": {
"Dimensions": [
{
"Name": "Outcome",
"Value": "5xx",
},
],
"MetricName": "ApnsResponse",
"Namespace": "Notifications/CODE/liveactivities-channel-cleaner",
},
"Period": 300,
"Stat": "Sum",
},
"ReturnData": false,
},
],
"Tags": [
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
{
"Key": "gu:repo",
"Value": "guardian/mobile-n10n",
},
{
"Key": "Stack",
"Value": "mobile-notifications",
},
{
"Key": "Stage",
"Value": "CODE",
},
],
"Threshold": 1,
"TreatMissingData": "notBreaching",
},
"Type": "AWS::CloudWatch::Alarm",
},
"liveactivitiesapnserrorschannelmanageralarm28AE3817": {
"Properties": {
"ActionsEnabled": true,
"AlarmActions": [
{
"Fn::Join": [
"",
[
"arn:aws:sns:",
{
"Ref": "AWS::Region",
},
":",
{
"Ref": "AWS::AccountId",
},
":mobile-server-side",
],
],
},
],
"AlarmDescription": "APNS returned 4xx/5xx responses from the channel-manager lambda",
"AlarmName": "liveactivities-apns-errors-channel-manager-CODE",
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
"EvaluationPeriods": 1,
"Metrics": [
{
"Expression": "apns4xx + apns5xx",
"Id": "expr_1",
"Label": "APNS 4xx + 5xx",
"ReturnData": true,
},
{
"Id": "apns4xx",
"MetricStat": {
"Metric": {
"Dimensions": [
{
"Name": "Outcome",
"Value": "4xx",
},
],
"MetricName": "ApnsResponse",
"Namespace": "Notifications/CODE/liveactivities-channel-manager",
},
"Period": 300,
"Stat": "Sum",
},
"ReturnData": false,
},
{
"Id": "apns5xx",
"MetricStat": {
"Metric": {
"Dimensions": [
{
"Name": "Outcome",
"Value": "5xx",
},
],
"MetricName": "ApnsResponse",
"Namespace": "Notifications/CODE/liveactivities-channel-manager",
},
"Period": 300,
"Stat": "Sum",
},
"ReturnData": false,
},
],
"Tags": [
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
{
"Key": "gu:repo",
"Value": "guardian/mobile-n10n",
},
{
"Key": "Stack",
"Value": "mobile-notifications",
},
{
"Key": "Stage",
"Value": "CODE",
},
],
"Threshold": 1,
"TreatMissingData": "notBreaching",
},
"Type": "AWS::CloudWatch::Alarm",
},
"liveactivitiesbroadcastdlqCODEAlarm3AB74C54": {
"Properties": {
"ActionsEnabled": true,
Expand Down Expand Up @@ -722,6 +1001,11 @@ exports[`The LiveActivities stack matches the snapshot for CODE 1`] = `
],
},
},
{
"Action": "cloudwatch:PutMetricData",
"Effect": "Allow",
"Resource": "*",
},
],
"Version": "2012-10-17",
},
Expand Down Expand Up @@ -1070,6 +1354,11 @@ exports[`The LiveActivities stack matches the snapshot for CODE 1`] = `
],
},
},
{
"Action": "cloudwatch:PutMetricData",
"Effect": "Allow",
"Resource": "*",
},
],
"Version": "2012-10-17",
},
Expand Down Expand Up @@ -1438,6 +1727,11 @@ exports[`The LiveActivities stack matches the snapshot for CODE 1`] = `
],
},
},
{
"Action": "cloudwatch:PutMetricData",
"Effect": "Allow",
"Resource": "*",
},
],
"Version": "2012-10-17",
},
Expand Down
Loading
Loading