- Newest
- Most votes
- Most comments
That AI generated answer is not very helpful.
- "Verify that your domain configuration supports MQTT_WSS protocol": you mean AWS' domain? I even lined this
- "Update your policy to explicitly allow WebSocket connections": which policies are we talking about?
- "Consider using IAM user credentials instead of root credentials": if it doesn't work with root, why should I waste my time on a new IAM user?
- "Verify that the date in your signature is correct (your example shows 2026, which might be causing validation issues if it's too far in the future).": that date is auto generated, and correspond to the current time.
Is there a real person I can talk to?! PLEASE!
answered 9 months ago
Edit: I have updated the question with the policy I am using right now. I have created a new IAM user for IoT, with its own access key pair, but I still get 403. @Gary Mclean I have reviewed the samples you sent me yesterday, but the implementation is pretty much the same. Can you please advise further?
answered 9 months ago
Does any info here help? https://github.com/aws/aws-iot-device-sdk-java-v2/tree/main/samples/Mqtt
Your using MQTTv5? As apposed to v3?
Based on the information provided, it appears you're trying to connect to AWS IoT Core using MQTT over WebSocket with Signature Version 4 authentication, but receiving a 403 Forbidden error.
Looking at your policy and setup, I can identify a few potential issues:
-
Your policy doesn't explicitly include permissions for WebSocket connections. While you have "iot:Connect" permission with a wildcard resource, AWS IoT Core treats MQTT over WebSocket connections differently from direct MQTT connections.
-
When using MQTT over WebSocket (MQTT_WSS), you need to ensure that your domain configuration supports this protocol. AWS IoT supports different application protocols including SECURE_MQTT (MQTT over TLS), MQTT_WSS (MQTT over WebSocket), HTTPS, and DEFAULT.
-
You're using root user credentials for signing, which is not recommended for security reasons. It's better to use IAM user credentials or, preferably, temporary credentials from AWS STS.
To resolve this issue, try the following:
-
Verify that your domain configuration supports MQTT_WSS protocol.
-
Update your policy to explicitly allow WebSocket connections. You might need to add specific permissions for WebSocket endpoints.
-
Consider using IAM user credentials instead of root credentials.
-
Double-check your signature generation process, ensuring all required headers and parameters are correctly included.
-
Verify that the date in your signature is correct (your example shows 2026, which might be causing validation issues if it's too far in the future).
The 403 Forbidden error typically indicates a permissions issue, suggesting that either your signature is invalid or your policy doesn't grant the necessary permissions for the action you're attempting.
Sources
Permissions and policies - AWS IoT Core
UpdateDomainConfiguration - AWS IoT
CreateDomainConfiguration - AWS IoT
answered 9 months ago
Relevant content
asked 8 months ago
- AWS OFFICIALUpdated 4 years ago

Hi Gary, thanks for your help. I'll take a look a those samples asap, though at first glance my implementation (it's Dart) is pretty similar to the one in there. Are you implying that it's not a policy/IAM issue? The package I'm using is called "mqtt5", though the handshake is made via Dart's built-in http client -- the request is in my question, above