Using Boto3 to get cups.crt, cups.key and cups.trust

0

I'm writing an IoT Wireless Gateway provisioning script using Boto3 and cannot figure out how to create, download, and update cups.key and cups.trust files.

I've managed to get the cups.crt file using describe_certificate() but I cannot figure out which Boto methods will get me the rest of the certs necessary to connect a gateway.

  • Digging a little deeper, I believe since these are only available once that I need to capture them when creating using create_keys_and_certificate(), which I have working now..

    However, a new question is create_keys_and_certificate() gives me:

    • certificatePem
    • PrivateKey
    • PublicKey

    And I'm not clear on how these correspond to cups.key, cups.trust and cups.crt. Is this correct? certificatePem = cups.crt PrivateKey = cups.key PublicKey = cups.trust? Or is cups.trust a different certificate not offered by the create_keys_and_certificate() response?

已提問 1 年前檢視次數 294 次
2 個答案
0
AWS
專家
已回答 1 年前
0

Hi. You can find a complete working example here: https://github.com/aws-samples/aws-iot-greengrass-component-lorawan-provisioning/blob/master/artifacts/main.py. It's a Greengrass component, but it does everything you need. In this case, the gateway self-provisions.

profile pictureAWS
專家
Greg_B
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南