Gonzalo Ayuso: Handling Amazon SNS messages with PHP, Lumen and CloudWatch
Gonzalo Ayuso has posted a tutorial to his site showing how to handle incoming Amazon SNS messages with a combination of Lumen, CloudWatch and some plain PHP.
This days I’m involve with Amazon’s AWS and since I am migrating my backends to Lumen I’m going to play a little bit with AWS and Lumen. Today I want to create a simple Lumen server to handle SNS notifications. One end-point to listen to SNS and another one to emit notifications. I also want to register logs within CloudWatch.
He starts with the Lumen backend, creating a simple applications that hooks in the AWS and Logging service providers and defines the two routes ("push" and "read"). The post also includes the code for both the AWS and logging service providers and the
SnsController. The end result (available on GitHub) then sends a basic SNS message and the response is captured and sent to CloudWatch.