guardian / mobile-n10n

n10n for nOTIFICATIOn
Apache License 2.0
26 stars 4 forks source link

Enable nightly backups for notification DynamoDB tables #1194

Closed jacobwinch closed 10 months ago

jacobwinch commented 10 months ago

What does this change?

This PR allows us to start backing up the mobile-notifications-reports-<stage> and mobile-notifications-football-notifications-<stage> DynamoDB tables using https://github.com/guardian/aws-backup.

For more details on this project see this doc and this audit that @guardian/devx-reliability have been working on with Heads of Engineering & EMs.

How to test

[09:52:09] Resource - ResourceChange(Action=Modify, LogicalResourceId=DynamoTable, PhysicalResourceId=mobile-notifications-football-notifications-CODE, ResourceType=AWS::DynamoDB::Table, Replacement=False, Scope=[Properties], Details=[ResourceChangeDetail(Target=ResourceTargetDefinition(Attribute=Properties, Name=Tags, RequiresRecreation=Never), Evaluation=Static, ChangeSource=DirectModification)])
  [09:52:09] mobile-notifications-football-CODE (AWS::CloudFormation::Stack): UPDATE_IN_PROGRESS
  [09:52:09] User Initiated
  [09:52:14] DynamoTable (AWS::DynamoDB::Table): UPDATE_IN_PROGRESS
  [09:52:19] DynamoTable (AWS::DynamoDB::Table): UPDATE_COMPLETE

image

How can we measure success?

We will be able to recover (most) of the data stored in these tables in the unlikely event that they are ever deleted.

Have we considered potential risks?

Yes, a number of risks related to performance, cost and privacy were considered. See this doc for more details.

The doc mentions that the Mobile account might have greater costs than others, but this is primarily due to one very large table (which is not affected by this PR!) - more details on this can be found here.

Deployment

Merging the PR should be sufficient to update mobile-notifications-football-notifications-<stage>.

After the PR is merged the dynamo.yaml template (which contains the mobile-notifications-reports-<stage> table) needs to be applied manually.

github-actions[bot] commented 10 months ago

Deploy build 4236 of mobile-n10n:eventconsumer to CODE

All deployment options - [Deploy build 4236 of `mobile-n10n:eventconsumer` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=mobile-n10n%3Aeventconsumer&build=4236&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 4236 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=mobile-n10n%3Aeventconsumer&build=4236&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=mobile-n10n%3Aeventconsumer&stage=CODE)

From guardian/actions-riff-raff.

github-actions[bot] commented 10 months ago

Deploy build 4239 of mobile-n10n:schedule to CODE

All deployment options - [Deploy build 4239 of `mobile-n10n:schedule` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=mobile-n10n%3Aschedule&build=4239&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 4239 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=mobile-n10n%3Aschedule&build=4239&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=mobile-n10n%3Aschedule&stage=CODE)

From guardian/actions-riff-raff.

github-actions[bot] commented 10 months ago

Deploy build 4238 of mobile-n10n:football to CODE

All deployment options - [Deploy build 4238 of `mobile-n10n:football` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=mobile-n10n%3Afootball&build=4238&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 4238 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=mobile-n10n%3Afootball&build=4238&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=mobile-n10n%3Afootball&stage=CODE)

From guardian/actions-riff-raff.

github-actions[bot] commented 10 months ago

Deploy build 4237 of mobile-n10n:reportextractor to CODE

All deployment options - [Deploy build 4237 of `mobile-n10n:reportextractor` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=mobile-n10n%3Areportextractor&build=4237&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 4237 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=mobile-n10n%3Areportextractor&build=4237&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=mobile-n10n%3Areportextractor&stage=CODE)

From guardian/actions-riff-raff.

github-actions[bot] commented 10 months ago

Deploy build 4235 of mobile-n10n:fakebreakingnewslambda to CODE

All deployment options - [Deploy build 4235 of `mobile-n10n:fakebreakingnewslambda` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=mobile-n10n%3Afakebreakingnewslambda&build=4235&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 4235 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=mobile-n10n%3Afakebreakingnewslambda&build=4235&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=mobile-n10n%3Afakebreakingnewslambda&stage=CODE)

From guardian/actions-riff-raff.

github-actions[bot] commented 10 months ago

Deploy build 4236 of mobile-n10n:report to CODE

All deployment options - [Deploy build 4236 of `mobile-n10n:report` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=mobile-n10n%3Areport&build=4236&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 4236 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=mobile-n10n%3Areport&build=4236&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=mobile-n10n%3Areport&stage=CODE)

From guardian/actions-riff-raff.

github-actions[bot] commented 10 months ago

Deploy build 4243 of mobile-n10n:notification to CODE

All deployment options - [Deploy build 4243 of `mobile-n10n:notification` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=mobile-n10n%3Anotification&build=4243&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 4243 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=mobile-n10n%3Anotification&build=4243&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=mobile-n10n%3Anotification&stage=CODE)

From guardian/actions-riff-raff.

github-actions[bot] commented 10 months ago

Deploy build 4246 of mobile-n10n:slomonitor to CODE

All deployment options - [Deploy build 4246 of `mobile-n10n:slomonitor` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=mobile-n10n%3Aslomonitor&build=4246&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 4246 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=mobile-n10n%3Aslomonitor&build=4246&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=mobile-n10n%3Aslomonitor&stage=CODE)

From guardian/actions-riff-raff.

github-actions[bot] commented 10 months ago

Deploy build 4243 of mobile-n10n:registration to CODE

All deployment options - [Deploy build 4243 of `mobile-n10n:registration` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=mobile-n10n%3Aregistration&build=4243&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 4243 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=mobile-n10n%3Aregistration&build=4243&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=mobile-n10n%3Aregistration&stage=CODE)

From guardian/actions-riff-raff.

github-actions[bot] commented 10 months ago

Deploy build 4268 of mobile-n10n:notificationworkerlambda to CODE

All deployment options - [Deploy build 4268 of `mobile-n10n:notificationworkerlambda` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=mobile-n10n%3Anotificationworkerlambda&build=4268&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 4268 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=mobile-n10n%3Anotificationworkerlambda&build=4268&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=mobile-n10n%3Anotificationworkerlambda&stage=CODE)

From guardian/actions-riff-raff.

jacobwinch commented 10 months ago

After the PR is merged the dynamo.yaml template (which contains the mobile-notifications-reports- table) needs to be applied manually.

image

jacobwinch commented 10 months ago

This is working in PROD:

image image