上QQ阅读APP看书,第一时间看更新
Creating a security certificate
Before we use AWS IoT, we should create a security certificate. Then, this certificate will be attached to our registered IoT device. Follow these steps:
- On AWS IoT Management Console, open your IoT device. Click on the Security option on the left-hand menu. You should see a form, as shown in the following screenshot:
- You should see a Create certificate button. Click on this button. Then, AWS IoT will generate private and public keys for your IoT device. Please download all certificate and key files:
These certificate and key files will be used in our program to access the AWS IoT server. You should get four files, as follows:
-
- Certificate file (*.pem)
- Certificate public key file (*.key)
- Certificate private key file (*.key)
- Root certificate (*.pem) or (*.crt)
- Put all these files into a folder. Our program will access these files:
The next step is to write a program. We will do so in the next section.