Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLPAB-1090 - Stream DB Events to Eventbridge Bus #547

Merged
merged 15 commits into from
Jun 26, 2023
Merged

Conversation

andrewpearce-digital
Copy link
Contributor

@andrewpearce-digital andrewpearce-digital commented Jun 22, 2023

Purpose

Forward database events for processing

Fixes MLPAB-1090

Approach

  • use deletion protection instead of lifecycle rules and prevent prod deletion
  • create a dynamodb table for reduced fees
  • create an event bus for sending events across accounts
  • create an event bridge pipe to send events from dynamodb stream to the event bus
  • add rule to forward to a remote event bus

Put an item with the aws cli

aws-vault exec <profile> -- aws dynamodb put-item \
    --table-name <environment-name>-reduced-fees \
    --item '{"PK": {"S": "eff"}}'

Note:
There's a bug with the aws provider causing an error when creating a pipe. hashicorp/terraform-provider-aws#32018

Learning

The total entry size must be less than 256KB. You can calculate the entry size before you send the events.

@github-actions
Copy link

github-actions bot commented Jun 22, 2023

PR Environment Terraform Plan Summary

Plan: 0 to add, 0 to change, 11 to destroy

@andrewpearce-digital andrewpearce-digital temporarily deployed to dev_547mlpab109 June 22, 2023 14:34 — with GitHub Actions Inactive
@andrewpearce-digital andrewpearce-digital temporarily deployed to dev_547mlpab109 June 22, 2023 15:08 — with GitHub Actions Inactive
@andrewpearce-digital andrewpearce-digital temporarily deployed to dev_547mlpab109 June 22, 2023 15:55 — with GitHub Actions Inactive
@andrewpearce-digital andrewpearce-digital temporarily deployed to dev_547mlpab109 June 22, 2023 18:15 — with GitHub Actions Inactive
@andrewpearce-digital andrewpearce-digital changed the title MLPAB-1090 - MLPAB-1090 - Stream DB Events to Eventbridge Bus Jun 22, 2023
@andrewpearce-digital andrewpearce-digital temporarily deployed to dev_547mlpab109 June 22, 2023 18:58 — with GitHub Actions Inactive
@andrewpearce-digital andrewpearce-digital temporarily deployed to dev_547mlpab109 June 23, 2023 13:03 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (20a6414) 92.58% compared to head (e4b1055) 92.58%.

❗ Current head e4b1055 differs from pull request most recent head c13fc51. Consider uploading reports for the commit c13fc51 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #547   +/-   ##
=======================================
  Coverage   92.58%   92.58%           
=======================================
  Files         134      134           
  Lines        6203     6203           
=======================================
  Hits         5743     5743           
  Misses        391      391           
  Partials       69       69           
Flag Coverage Δ
unittests 92.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@andrewpearce-digital andrewpearce-digital temporarily deployed to dev_547mlpab109 June 23, 2023 14:01 — with GitHub Actions Inactive
@andrewpearce-digital andrewpearce-digital temporarily deployed to dev_547mlpab109 June 26, 2023 11:17 — with GitHub Actions Inactive
@andrewpearce-digital andrewpearce-digital marked this pull request as ready for review June 26, 2023 11:36
@andrewpearce-digital andrewpearce-digital requested a review from a team as a code owner June 26, 2023 11:36
@andrewpearce-digital andrewpearce-digital merged commit 7fdc01e into main Jun 26, 2023
@andrewpearce-digital andrewpearce-digital deleted the MLPAB-1090 branch June 26, 2023 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants