| Server IP : 138.197.107.151 / Your IP : 216.73.217.7 Web Server : Apache/2.4.58 (Ubuntu) System : Linux BloxBy-Builder 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : wpbetasites_mrakzqskir ( 1022) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/bsd-crawler-parser/aws/dist/awscli/examples/iot/ |
Upload File : |
**To test your AWS IoT policies**
The following ``test-authorization`` example tests the AWS IoT policies associated with the specified principal. ::
aws iot test-authorization \
--auth-infos actionType=CONNECT,resources=arn:aws:iot:us-east-1:123456789012:client/client1 \
--principal arn:aws:iot:us-west-2:123456789012:cert/aab1068f7f43ac3e3cae4b3a8aa3f308d2a750e6350507962e32c1eb465d9775
Output::
{
"authResults": [
{
"authInfo": {
"actionType": "CONNECT",
"resources": [
"arn:aws:iot:us-east-1:123456789012:client/client1"
]
},
"allowed": {
"policies": [
{
"policyName": "TestPolicyAllowed",
"policyArn": "arn:aws:iot:us-west-2:123456789012:policy/TestPolicyAllowed"
}
]
},
"denied": {
"implicitDeny": {
"policies": [
{
"policyName": "TestPolicyDenied",
"policyArn": "arn:aws:iot:us-west-2:123456789012:policy/TestPolicyDenied"
}
]
},
"explicitDeny": {
"policies": [
{
"policyName": "TestPolicyExplicitDenied",
"policyArn": "arn:aws:iot:us-west-2:123456789012:policy/TestPolicyExplicitDenied"
}
]
}
},
"authDecision": "IMPLICIT_DENY",
"missingContextValues": []
}
]
}
For more information, see `TestAuthorization <https://docs.aws.amazon.com/iot/latest/apireference/API_TestAuthorization.html>`__ in the *AWS IoT API Reference*.