I am currently able to send an SMS to a user mobile phone using AWS SNS SDK. I want to use combination of SNS for outgoing SMS and Pinpoint only for incoming SMS. I can receive a message as well using AWS Pinpoint. What I am missing currently is I am not able to correlate the outgoing and incoming messages. For e.g. When I publish to Sns I record a message Id as uuid1 and when I receive a message from Pinpoint and I look into previous message Id not same as uuid1. Is there any way to relate these two SMS using any metadata in the AWS infrastructure?
Unfortunately there is not. Text messages are stateless and there isn't really a concept of "conversations", they are just a series of messages that happen between two numbers. You will need to create some sort of database of source/destination messages and use inbound/outbound phone numbers to correlate the messages together.