Skip to content

Decommission mobile-notifications-schedule lambda #1553

@akash1810

Description

@akash1810

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):

Image

If we look at the contents of the (PROD) DynamoDb table, we see it is empty. This correlates to the above CloudWatch metrics:

Image

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:

  1. Remove it from Riff-Raff
  2. Remove the build for schedule-lambda
  3. Delete the CloudFormation stacks:
    • mobile-notifications-schedule-CODE
    • mobile-notifications-schedule-PROD
    • mobile-notifications-schedule-dynamo-CODE
    • mobile-notifications-schedule-dynamo-PROD
  4. Delete the schedulelambda directory, which contains the application code and CloudFormation template
  5. Remove the CloudFormation template for the DynamoDb table
  6. Remove the SBT project
  7. Remove the /push/schedule endpoint from the Notifications service
  8. Decommission the API key used by the lambda when making requests to the Notifications API

Footnotes

  1. This list might not be exhaustive! Please add to it as needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceDepartmental tracking: maintenance work, not a fix or a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions