连接AWS服务器以获取MQTT时出现异常

时间:2017-02-01 06:35:21

标签: android amazon-web-services mqtt aws-sdk

我试图从https://github.com/awslabs/aws-sdk-android-samples/blob/master/AndroidPubSub/README.md运行示例。我更改了PoolIdEnd ServerPolicy Name。我正在接受例外。

Exception occurred when generating new private key and certificate. com.amazonaws.AmazonServiceException: 1 validation error detected: Value 'us-west-2_something' at 'identityPoolId' failed to satisfy constraint: Member must satisfy regular expression pattern: [\w-]+:[0-9a-f-]+ (Service: AmazonCognitoIdentity; Status Code: 400; Error Code: ValidationException; Request ID: f7c3924a-e847-11e6-8508-ab41b4890740)

1 个答案:

答案 0 :(得分:1)

您需要转到Cognito console并创建一个Cognito Identity Pool,并将us-west-2_something替换为看起来像us-west-2:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx的实际身份池ID