First, you need to write a Lambda function which is invoked via HTTP request so you'll also need to setup API Gateway to route connections to your Lambda function.
After that, enable the Lambda function to push that data to "SNS Topic" meanwhile SMS Subscription will "poll" for any new data in this "Topic". This way soon as any data gets into this topic, it will be consumed by subscription and SMS will be sent.
Try implementing this login in your code.