msfidelis / dynamodb-eventbridge-pipes-to-sqs

Educational example to explain how to setup EventBridge Pipes to sync DynamoDB new itens to SQS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to setup EventBridge Pipes to send New DynamoDB Itens do SQS πŸ‘‹

License: MIT Twitter: fidelissauro

topology

DynamoDB Stream Event Example

{
    "eventID": "a8f715d304a8daab894872742a3855b7",
    "eventName": "INSERT",
    "eventVersion": "1.1",
    "eventSource": "aws:dynamodb",
    "awsRegion": "us-east-1",
    "dynamodb": {
        "ApproximateCreationDateTime": 1722360292,
        "Keys": {
            "id": {
                "S": "a40d1614-5234-4ef2-aa6a-c25c3b5c58a3"
            }
        },
        "NewImage": {
            "id": {
                "S": "a40d1614-5234-4ef2-aa6a-c25c3b5c58a3"
            }
        },
        "SequenceNumber": "100000000093582842803",
        "SizeBytes": 76,
        "StreamViewType": "NEW_IMAGE"
    },
    "eventSourceARN": "arn:aws:dynamodb:us-east-1:181560427716:table/stream-pipe/stream/2024-07-30T17:20:48.118"
}

Requirements

No requirements.

Providers

Name Version
aws 5.60.0
awscc 1.7.0

Modules

No modules.

Resources

Name Type
aws_dynamodb_table.main resource
aws_iam_policy.eventbridge_pipes_policy resource
aws_iam_policy_attachment.eventbridge_pipes_policy_attachment resource
aws_iam_role.eventbridge_pipes_role resource
aws_sqs_queue.dlq resource
aws_sqs_queue.main resource
awscc_pipes_pipe.main resource
aws_caller_identity.current data source

Inputs

Name Description Type Default Required
eventbridge_pipe_sqs_batch_size n/a number 10 no
eventbridge_pipe_sqs_batch_timeout_in_seconds n/a number 10 no
project_name n/a string "stream-pipe" no

Outputs

No outputs.

✨ Demo

Install

terraform apply

Usage

terraform apply

Run tests

terraform plan

Author

πŸ‘€ Matheus Fidelis

🀝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

πŸ“ License

Copyright Β© 2021 Matheus Fidelis.
This project is MIT licensed.


_This README was generated with ❀️ by readme-md-generator_

About

Educational example to explain how to setup EventBridge Pipes to sync DynamoDB new itens to SQS


Languages

Language:HCL 62.2%Language:Go 37.8%