Pinpoint Email: CreateConfigurationSetEventDestination API Issue (PHP)

0

I'm trying to create an event destination for a configuration set using the https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-pinpoint-email-2018-07-26.html#createconfigurationseteventdestination but it always saying that the Pinpoint Application that I'm trying to add does not exist. I can confirm that the Pinpoint application does exist and is active. The API and Pinpoint also use the same region and account and using the CLI to create it works fine.

Here's the example payload that I'm passing to the endpoint:

[
       'ConfigurationSetName' => 'test,
                'EventDestination'     => [
                    'Enabled'             => true,
                    'MatchingEventTypes'  => ['CLICK'],
                    "PinpointDestination" => [
                        "ApplicationArn" => 'arn:aws:mobiletargeting:{REGION}:{ACCOUNT_ID}:apps/{ProjectId}',
                    ],
                ],
                'EventDestinationName' => 'test',
]

The result is:

{"message": "Could not find the Pinpoint application: 'arn:aws:mobiletargeting:{REGION}:{ACCOUNT_ID}:apps/{ProjectId}'" }

Does anyone experience having similar issue with this particular endpoint?

1 Answer
0

Hello,

Since you are able to create an event destination with the help of CreateConfigurationSetEventDestination CLI command as well as via using console, it doesn't seem to be an IAM or policy related issue.

My suggestion here would be to go through you Lambda code once more and check the configuration of configuration set and event destination. As BadRequestException generally mean that the request being made does not follow the proper format or is having wrong set of data. Refer below documentation for creating configuration set

[+] https://docs.aws.amazon.com/pinpoint-email/latest/APIReference/API_CreateConfigurationSet.html

Further, if you believe the API request is being made properly via your code and is still giving this error, then I would recommend you to open a support case with AWS for further information. If a support case has already been created please be assured we will get back to you and assist you in the best way possible

AWS
Tanya_G
answered a year ago
  • Yep, a support case has been created. I was certain that I'm passing the correct (and existing) Pinpoint ARN on the endpoint.

    I've also ruled out the following possible cases just to make sure I did not mess up the configuration:

    a. I've checked the regions between the session of the API I'm using vs the region where the pinpoint application is located. Both of them are using "us-east-1" since I was able to get the region from the session using the .getRegion method, plus the endpoint will return an error that you are finding a Pinpoint application from a different region if they were different.

    b. I've also tried using different Pinpoint Applications but all of them return the same results saying that the application does not exist.

    c. The Pinpoint ARN format as I've got the value from the get-application CLI command and the endpoint will return an error if the ARN has an invalid format.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions