I have requirement to publish messages from SNS to kinesis. I have found that, it is not possible directly by subscribing same as SNS/SQS. I will need to write lambda to fetch from SNS and publish it to kinesis. Is there any other way to publish records from SNS to kinesis directly? Thanks
Amazon SNS is a publish/subscribe model.
Messages sent to SNS can be subscribed from:
http/s
: delivery of JSON-encoded message via HTTP POSTemail
: delivery of message via SMTPemail-json
: delivery of JSON-encoded message via SMTPsms
: delivery of message via SMSsqs
: delivery of JSON-encoded message to an Amazon SQS queueapplication
: delivery of JSON-encoded message to an EndpointArn for a mobile app and device.lambda
: delivery of JSON-encoded message to an AWS Lambda function.See: Subscribe - Amazon Simple Notification Service
Of these, the only ones that could be used to send to Amazon Kinesis would be to use AWS Lambda. You would need to write a Lambda function that would send the message to a Kinesis stream.
To clarify: Your Lambda function will not "fetch from SNS". Rather, the Lambda function will be triggered by SNS, with the message being passed as input. Your Lambda function will then need to send the message to Kinesis.
Your only other alternative is to change the system that currently sends the message to SNS and have it send the message to Kinesis instead.