为 MQTT 连接 AWS 服务器时出现异常
Exception while connecting AWS server for MQTT
我已经尝试 运行 来自 https://github.com/awslabs/aws-sdk-android-samples/blob/master/AndroidPubSub/README.md 的示例。我已经更改了 PoolId
、End Server
和 Policy 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)
您需要转到 Cognito console 并创建一个 Cognito 身份池并将 us-west-2_something
替换为实际的身份池 ID,如下所示 us-west-2:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
我已经尝试 运行 来自 https://github.com/awslabs/aws-sdk-android-samples/blob/master/AndroidPubSub/README.md 的示例。我已经更改了 PoolId
、End Server
和 Policy 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)
您需要转到 Cognito console 并创建一个 Cognito 身份池并将 us-west-2_something
替换为实际的身份池 ID,如下所示 us-west-2:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx