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?

2 Answers
0
AWS
EXPERT
answered a year ago
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
EXPERT
Greg_B
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions