- Newest
- Most votes
- Most comments
Based on your description, there are several potential causes for your connection issue with AWS IoT from your iOS app:
-
Certificate Status: Even though your certificate works with OpenSSL and Mosquitto, ensure that the certificate is marked as "Active" in the AWS IoT console. Inactive certificates will be refused connection even if the policy is correct.
-
Policy Issues: While you've set up a policy with broad permissions (using "*" as the resource), there might still be issues with how the policy is attached to your certificate. Double-check that the policy is properly attached to the certificate you're using.
-
Certificate Format: When importing certificates into iOS using AWSIoTManager.importIdentity, the format needs to be correct. The X12 bundle format you mentioned should work, but verify that the iOS app is correctly extracting and using the certificates from this bundle.
-
Authentication Flow: iOS apps connecting to AWS IoT require proper mutual TLS authentication. Make sure your app is correctly implementing the TLS handshake process with the certificate and private key.
-
Endpoint Configuration: Verify that you're using the correct AWS IoT endpoint in your iOS app. The endpoint should be in the format "[account-specific-prefix]-ats.iot.[region].amazonaws.com".
-
Time Synchronization: TLS handshakes require accurate time. Ensure your device's time is correctly synchronized.
Since you've confirmed the certificates work with other tools, the issue is likely specific to how your iOS app is implementing the connection. Check your implementation against the AWS IoT SDK for iOS documentation, particularly focusing on how certificates are loaded and used during the connection process.
Sources
Troubleshoot problems with the sample application - AWS IoT Core
ESP32 Fails to Connect to AWS IoT Core via MQTT (TLS Handshake Error) | AWS re:Post
AUTHORIZATION_FAILURE IoT Core | AWS re:Post
Diagnosing connectivity issues - AWS IoT Core
Relevant content
- asked a year ago
- AWS OFFICIALUpdated a year ago
