SNS message type header not provided.
Closed this issue · 3 comments
Hi,
First of all I wanna thank you for sharing the code with us.
But when I run the code i get the following error:
Fatal error: Uncaught exception 'RuntimeException' with message 'SNS message type header not provided.' in /home/communiq/domains/millows.communiq.nl/public_html/aws/vendor/aws/aws-php-sns-message-validator/src/Message.php:33
Stack trace: #0 /home/communiq/domains/millows.communiq.nl/public_html/aws/SimpleNotificationService.php(46): Aws\Sns\Message::fromRawPostData() #1 {main} thrown in /home/communiq/domains/millows.communiq.nl/public_html/aws/vendor/aws/aws-php-sns-message-validator/src/Message.php on line 33
The subscription is already confirmed..
Could you please help me out here?
When SNS sends messages to your endpoint, the HTTP message should have a x-amz-sns-message-type
header (as described in the SNS documentation). Are you receiving messages without that header?
Yes its fixed! Just needed to add the message to a log file.
Glad everything worked out. Please feel free to reopen if the problem comes back.