CDLUC3 / dmsp_aws_prototype

Sceptre CloudFormation templates for DMPHub v2
MIT License
1 stars 0 forks source link

Update EZID Publisher logic to allow the integration to be paused #34

Closed briri closed 10 months ago

briri commented 1 year ago

Update the src/sam/functions/ezid_publisher/app.rb lambda so that it can be paused.

Use the /uc3/dmp/hub/[env]/EzidPaused SSM variable to enable/disable the logic.

Create a method that stashes the original EventBridge message either in the EventBridge Archive or the SQS DeadLetterQueue (whichever makes the most sense)

Also update the logic so that any failures when creating/updating the EZID DOI are emailed to the admin and stashed for reprocessing.

briri commented 1 year ago

Logic is in place.

The EzidPublisher Lambda checks the /uc3/dmp/hub/%{env}/EzidPaused SSM parameter to see if the integration is paused. If so, the Lambda will republish the event with the detail-type of paused. The EventBridge Archive has a rule that grabs any events with that paused type.

The EventBridge Archive will currently store events for 7 days, we should never need to pause the integration for that long. Events can then manually be replayed from the console (by setting the detail-type back to DMP change). We may want to build a Lambda to do this automatically.

We will need to test this workflow.

briri commented 10 months ago

This is working now and instructions for the process can be found on the wiki: https://github.com/CDLUC3/dmp-hub-cfn/wiki/lambdas-triggered-by-eventbridge#pausing-communications-with-ezid