2개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
1
Hi,
perhaps the provisioning exercises from the IoT Device Management workshop might help.
Cheers,
Philipp
0
Looking at the AWS CLI documentation, I thought I could use the provisioning template by doing the following.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iot/register-thing.html
aws iot register-thing --template-body file:///provisioning-templates/templateName/provision/json
If you get an error when specifying a provisioning template in file format, try passing JSON as a string as is, as shown below.
aws iot register-thing \
--template-body '{"Parameters":{"ThingName":{"Type":"String"},"AWS::IoT::Certificate::Id":{"Type":"String"}},"Resources": {"certificate":{"Properties":{"CertificateId":{"Ref":"AWS::IoT::Certificate::Id"},"Status":"Active"},"Type":"AWS::IoT::Certificate"},"policy":{"Properties":{"PolicyName":"MyIotPolicy"},"Type":"AWS::IoT::Policy"},"thing":{"OverrideSettings":{"AttributePayload":"MERGE","ThingGroups":"DO_NOTHING","ThingTypeName":"REPLACE"},"Properties":{"AttributePayload":{},"ThingGroups":[],"ThingName":{"Ref":"ThingName"},"ThingTypeName":"VirtualThings"},"Type":"AWS::IoT::Thing"}}}'
sorry if my intent wasnt clear: I specifically want to use a PRE-DEFINED template. For security reasons. I dont want the device to be able to write its own template on the fly.
관련 콘텐츠
- AWS 공식업데이트됨 2년 전
- AWS 공식업데이트됨 2년 전
hm. the specific reference you gave, requires having our own CA, which for various reasons, I dont think is going to be viable. Is there a different option I missed somewhere there?
Also, I amended my original question, to make clear that I'm looking for a method that will auto-reject already existing thingnames