CmdID

CmdID / aws / aws iot

aws iot attach-thing-principal

Attaches the specified principal to the specified thing. AWS CLI reference

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To attach a certificate to your thing

The following attach-thing-principal example attaches a certificate to the MyTemperatureSensor thing. The certificate is identified by an ARN. You can find the ARN for a certificate in the AWS IoT console.

aws iot attach-thing-principal --thing-name MyTemperatureSensor --principal arn:aws:iot:us-west-2:123456789012:cert/2e1eb273792174ec2b9bf4e9b37e6c6c692345499506002a35159767055278e8Identify
--thing-nameThe name of the thing.
--principalThe principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.

This command produces no output.

For more information, see How to Manage Things with the Registry in the AWS IoT Developers Guide.

Options

3 in the AWS CLI reference
--principalThe principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
--thing-nameThe name of the thing.
--thing-principal-typeThe type of the relation you want to specify when you attach a principal to a thing.