Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in AWS by (5.6k points)

I'm looking for a clear answer on how to confirm the subscription request from Amazon SNS. I have already sent the subscription from the Amazon console to y website, but what to do next? I'm using EC2 instance as my server with PHP.

1 Answer

0 votes
by (12.4k points)

Before you configure the HTTP/HTTPS endpoints subscription through the AWS management console, you need to make sure that the HTTP/HTTPS endpoints of your PHP website have the capability to handle the HTTP POST requests that Amazon SNS generates. There are many types of SNS messages like SubscriptionConfirmation, Notification, and UnsubscribeConfirmation. so your PHP code needs to get the header "x-amz-sns-message-type" from the request and process it based on the message type. For the SubscriptionConfirmation message, your PHP application needs to process the POST message body, which is a JSON document. In order to subscribe to the topic, your PHP code needs to visit the "SubscriberURL" specified in the JSON body. Optionally, you should verify the signature to make sure of the authenticity of the message before subscribing to the topic. You can go through the AWS documentation here.

Do you want to master AWS? Then do check out the AWS Certified Solutions Architect Professional training by Intellipaat.

Related questions

0 votes
1 answer
asked Oct 10, 2019 in AWS by yuvraj (19.1k points)
Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Oct 10, 2019 in AWS by yuvraj (19.1k points)
0 votes
1 answer
0 votes
1 answer
asked Mar 14, 2021 in Azure by dev_sk2311 (45k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...