Furkan
Furkan

Reputation: 19

Getting "Event destination is not provided." error when using EventBridgeDestination as Event destination AWS PHP SDK

In my PHP Laravel web app I am using AWS PHP SDK and I want to use the createConfigurationSetEventDestination method of the SesV2Client class. When I execute this method by passing the proper arguments, I am getting the following error:

BadRequestException: Event destination is not provided.

Here is the code block I am using to execute this method:

$ses_client = new SesV2Client([
    'region' => 'eu-west-2',
]);

$ses_client->createConfigurationSetEventDestination([
    'ConfigurationSetName' => $configurationset_name,
    'EventDestination' => [
        'Enabled' => true,
        'MatchingEventTypes' => ['SEND', 'REJECT', 'BOUNCE', 'COMPLAINT', 'DELIVERY', 'OPEN', 'CLICK', 'RENDERING_FAILURE', 'DELIVERY_DELAY', 'SUBSCRIPTION'],
        'EventBridgeDestination' => [
            'EventBusArn' => 'arn:aws:events:eu-west-2:284331167928:event-bus/default',
        ],
    ],
    'EventDestinationName' =>  $configurationset_name . '-mail-status-webhook'
]);

According to the documentation here, I can use 'EventBridgeDestination' as a destination, just like in the code block I provided. However, whenever I try to use 'EventBridgeDestination', it throws the "BadRequestException: Event destination is not provided." error. I am sure that the configuration set name is right and the error I am getting is not about it.

The frustrating part is when I use another destination, for example, 'CloudWatchDestination' or 'KinesisFirehoseDestination', it works perfectly and does not throw an error. I have to use EventBridge method for the destination, but I can't figure out what the problem is.

What is wrong here? Is the AWS documentation incorrect, or am I missing something?

Upvotes: 0

Views: 22

Answers (0)

Related Questions