6

I'm studying AWS IoT for a big project and I want to understand more about this amazing service, so here I am with a question for you.

Each example inside the documentation of AWS IoT talks about one device connected to this service, but how the process works if I have thousand of them? Do I have to create a thing for each device, create and upload a certificate inside every tech unit and add them the right gateway endpoint?

I guess I should write a script that generates all these resources and uploads them inside the firmware during the assembly phase.

Which is the right way to use AWS-IoT for big quantities of devices?

1
  • Hello Marco, since you asked this, do you have anything to post as answer that can support me too? because I am exactly in the same situation and have exactly the same question. May 14, 2021 at 22:36

1 Answer 1

3

There are some suggestions on the AWS forum which I believe may help you:

I did a procedure similar to this.... Initially flash each device with a certificate only used during production. Every device can use the same certificate and it only needs to be in the flash and not in the SOC's key store. Since you encrypt the flash maybe put it into the data partition. This lets you write the same image into the flash on each device.

Register your own Certificate Authority with AWS IOT. Put the private key for it into System Parameter Store and secure it as much as you want. On the production line test the unit. Use the shared production key to attach to AWS IOT. Send a message containing the serial number of the chip (hardware CPUID number in most SOCs). Handle that message with a lambda that uses the secured private key for the CA to generate a new, unique certificate that embeds the serial of the device . Download the newly generated, unique keys for this certificate into the device and write the private key to OTP memory on the SOC. Delete the certificate used during production.

You don't have to do the unique certificate generation during production. Instead you could do it the first time the device attaches from the customer site. The advantage to doing it during production is that you can watch the serial numbers that you are generating certificates for and make sure your factory doesn't accidentally 'lose' a thousand devices for the grey market. If the factory tests 10,000 devices you will know it and be able to ensure they deliver 10,000 devices.

We are looking at adding a NXP A1006TL ($0.30) to provide better encryption support than what is in our SOC. Older embedded SOCs don't have a large enough OTP store for the private key. We put the unique private key in flash and then use a smaller key in OTP to decrypt it, but that is not fully secure since the private key could be accessed after it was decrypted.

1
  • 3
    Welcome to the site! We encourage answers that quote the relevant parts of the link in case the link breaks in future, and to help other readers in future find what they're looking for. I've edited your post to include this. You can also take a look at the tour if you want to find out more.
    – Aurora0001
    Jun 14, 2018 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.