From the course: AWS for Developers: SNS, SQS, and SWF
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Publish a message to an SNS topic - Amazon Web Services (AWS) Tutorial
From the course: AWS for Developers: SNS, SQS, and SWF
Publish a message to an SNS topic
- [Instructor] In the example files, copy up the NewApplicantEvent.php file to your server. Just like you did with the SQS example, make sure you change the region to match your AWS region. Also replace the SWS_ARN with the ARN of your new SNS topic. You can find the ARN by jumping back into your SNS console, click on Topics, click on your topic name, and then in the details, you'll see the ARN listed for this topic. Paste in the ARN to your code and save the file. You can then run the file by typing php NewApplicantEvent.php and hitting enter. You'll see the output from SNS that's returned when publishing a new message to the SNS topic. And if you check your email, you'll see that the email is going out to anyone who is registered to this SNS topic. Now, back on the server, open up ProcessApplication.php again. Remember, this is the file that'll run after an applicant presses submit on our application form.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.