-
Notifications
You must be signed in to change notification settings - Fork 5
Description
The mobile-notifications-schedule lambda runs every minute. When invoked, it reads from DynamoDb. During its execution, it produces CloudWatch metrics in the namespace mobile-notifications-schedule/<STAGE>/MobileNotificationSchedule. If we look at the CloudWatch metrics in this namespace for the last 12 months, it shows the lambda querying DynamoDb (query-success) and finding 0 results (discovered):
If we look at the contents of the (PROD) DynamoDb table, we see it is empty. This correlates to the above CloudWatch metrics:
Records are written to this DynamoDb table via the /push/schedule endpoint of the Notifications service. By performing a GitHub search we can see that the endpoint is no longer used.
These signals provide strong indications that the mobile-notifications-schedule lambda can be safely decommissioned. To do this we'd1:
- Remove it from Riff-Raff
- Remove the build for schedule-lambda
- Delete the CloudFormation stacks:
- mobile-notifications-schedule-CODE
- mobile-notifications-schedule-PROD
- mobile-notifications-schedule-dynamo-CODE
- mobile-notifications-schedule-dynamo-PROD
- Delete the schedulelambda directory, which contains the application code and CloudFormation template
- Remove the CloudFormation template for the DynamoDb table
- Remove the SBT project
- Remove the
/push/scheduleendpoint from the Notifications service - Decommission the API key used by the lambda when making requests to the Notifications API
Footnotes
-
This list might not be exhaustive! Please add to it as needed. ↩