I am trying to publish a message to a topic using the AWS SNSClient from the c++ SDK.
Can someone help me to find a way to figure out what is wrong with my approach? The error message I am getting only says that the "endpoint could not be reached".
I am trying to figure out where my request hangs - in my point of view it could be one of the following:
- the docker container the c++ app is running in is blocking the requests somehow (new to docker)
- the client configuration is wrong (region, arn, creditials wrong?)
- the request is malformed (some parameters not set? Message type maybe?)
Does someone know how I can debug my request and see what the issue is?
Thanks! My code looks something like this (api init and shutdown is omitted):
Aws::SNS::SNSClient client(credentials , config);
Aws::SNS::Model::PublishRequest pubReq;
pubReq.SetTopicArn("...");
pubReq.SetMessage("Test message");
pubOutcome = client.Publish(pubReq);
if(! pubOutcome.IsSuccess() ){
std::cout << "outcome: " << pubOutcome.GetError().GetMessage() << std::endl;
}