mage-os/mageos-async-events-aws

AWS event sinks for mage-os/mageos-async-events

Installs: 994

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 10

Forks: 1

Open Issues: 0

Type:magento2-module

v4.0.1 2024-09-18 00:32 UTC

This package is auto-updated.

Last update: 2024-11-14 11:55:36 UTC


README

AWS event sinks for mageos-async-events

Installation

composer require mage-os/mageos-async-events-aws

AWS event sinks

Amazon EventBridge

Configure AWS Credentials

An IAM role with the events:PutEvents action is required so that the notifier can relay events into Amazon EventBridge.

Under Stores -> Services -> Async Events AWS set the Access Key and the Secret Access Key and the Region. You can also choose to configure the source of the event.

AWS Config

Create an EventBridge Subscription

The following is an example to create an EventBridge subscription for the example.event

curl --location --request POST 'https://test.mageos.dev/rest/V1/async_event' \
--header 'Authorization: Bearer TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
    "asyncEvent": {
        "event_name": "example.event",
        "recipient_url": "Amazon Event Bridge ARN",
        "verification_token": "supersecret",
        "metadata": "eventbridge"
    }
}'

Amazon Simple Queue Service

Configure AWS Credentials

An IAM role with the sqs:SendMessage action is required so that the notifier can relay events into Amazon SQS.

Under Stores -> Services -> Async Events AWS set the Access Key and the Secret Access Key and the Region.

Note

The maximum message size for SQS is 262,144 bytes (256 KiB)

Create an SQS Subscription

curl --location --request POST 'https://test.mageos.dev/rest/V1/async_event' \
--header 'Authorization: Bearer TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
    "asyncEvent": {
        "event_name": "example.event",
        "recipient_url": "Amazon SQS queue URL",
        "verification_token": "supersecret",
        "metadata": "sqs"
    }
}'

Contributing

This is a repository for distribution only. Contributions are welcome on the development repository mageos-async-events-sinks