Reputation: 77
I have 10000 users, and i want to push notification SNS to each user, with different message. So, i cannot use Topic in this case. The problem is it delay too much. (About 1h30 hour for this to complete) Any solution? Thank you so much!
Upvotes: 2
Views: 360
Reputation: 429
Endpoint is something like internal AWS Identificator for combination: platform+device token or smth else. When we want to send an message we use it as address point instead of real.
About adding Endpoint to SNS. Generally it looks like so:
After you should create for each target user its endpoint with method like this:
$endPoint = $snsClient->createPlatformEndpoint([
'PlatformApplicationArn' => $SNS_APP_ARN,
'Token' => 'phone token'
]);
phone token for push notification is device-token. Endpoint generally is array/object which contains EndpointArn. Use it address when send message.
After that you can send an message to specific endpoint.
$snsClient->publish(
array(
'Message' => $pushMessage,
'TargetArn' => $endpointArn
));
Upvotes: 1