Skip to content

Can't get C++ client to connect #766

Answered by freezerdev
freezerdev asked this question in Q&A
Discussion options

You must be logged in to vote

I figured it out once I enabled logging on the server. The Python sample uses the client Id of "basicPubSub" whereas the C++ sample uses "test-" followed by a GUID. Checking the policy on the server I see...

{
	"Effect": "Allow",
	"Action": "iot:Connect",
	"Resource": [
		"arn:aws:iot:us-east-1:XXX:client/sdk-java",
		"arn:aws:iot:us-east-1:XXX:client/basicPubSub",
		"arn:aws:iot:us-east-1:XXX:client/sdk-nodejs-*"
	]
}

If I either add a fourth connection string, or use the command line of the C++ app to override the default clientId then the C++ client is able to connect.

You should consider changing the default clientId in the C++ code to something that works out of the box, or add anot…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@freezerdev
Comment options

Answer selected by freezerdev
@jmklix
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants