Open
Description
Describe the issue
The websocket connection will fail unless the Lambda function return the following policy:
{
"isAuthenticated": true,
"principalId": "TEST123",
"policyDocuments": [
{
"Version": "2012-10-17",
"Statement": [
{
"Action": ["iot:Connect"],
"Effect": "Allow",
"Resource": [
"arn:aws:iot:us-east-1:123456789012:client/custom_authorizer_connect_sample*"
]
},
{
"Action": ["iot:Publish"],
"Effect": "Allow",
"Resource": ["arn:aws:iot:us-east-1:123456789012:topic/test/topic"]
},
{
"Action": ["iot:Subscribe"],
"Effect": "Allow",
"Resource": [
"arn:aws:iot:us-east-1:123456789012:topicfilter/test/topic"
]
},
{
"Action": ["iot:Receive"],
"Effect": "Allow",
"Resource": ["arn:aws:iot:us-east-1:578079176758:topic/test/topic"]
}
]
}
],
"disconnectAfterInSeconds": 3600,
"refreshAfterInSeconds": 300
}
Links
https://github.com/aws/aws-iot-device-sdk-js-v2/tree/main/samples/browser/custom_authorizer_connect
Activity