Can i read AWS certificates from a SD CARD?

  • Hello to all:

    I'm following your tutorial for connect with AWS:

    But i changed the lines for load the certificates in order to load them from SD CARD (i replace some words with *****):

    AWS_PORT = 8883
    AWS_HOST = "*******"
    AWS_ROOT_CA = "/sd/certificados/AmazonRootCA1.pem"
    AWS_CLIENT_CERT = "/sd/certificados/*****.cert.pem"
    AWS_PRIVATE_KEY = "/sd/certificados/*****.private.key"

    Where i load from the SD card INSTEAD of flash memory (i have problems to accesing via FileZilla), but when i load the code an try to run it i get this error:

    Socket create error: CA file not found

    Besides i'm detecting the file from SD card:

    #Listamos el contenido dentro de 'sd'
    sdContent = os.listdir('/sd/certificados')
    print('Leyendo contenido de la micro SD: ', sdContent)

    And i get:

    Leyendo contenido de la micro SD:  ['start.ps1', 'VeriSign-Class 3-Public-Primary-Certification-Authority-G5.pem', 'AmazonRootCA1.pem', 'AmazonRootCA3.pem', '*****.cert.pem', '*****.private.key', '******.public.key']

    Where i clearly access to sd card, but the board can't find the certificate.

    How can i load certificates from SD card?

    Thank you and sorry for the english

Pycom on Twitter