I (8697) coreMQTT: MQTT connection established with the broker.
I (8707) FleetProvisioning: Established connection with claim credentials.
I (9357) corePKCS11: NOTE: define GENERATED_PRIVATE_KEY_WRITE_PATH in order to have the private key written to disk.
I (9457) TX_TASK: Wrote 30 bytes
I (9727) coreMQTT: Ack packet deserialized with result: MQTTSuccess.
I (9727) coreMQTT: State record updated. New state=MQTTPublishDone.
I (9937) coreMQTT: De-serialized incoming PUBLISH packet: DeserializerResult=MQTTSuccess.
I (9937) coreMQTT: State record updated. New state=MQTTPubAckSend.
I (9947) FleetProvisioning: Received accepted response from Fleet Provisioning CreateCertificateFromCsr API.
I (11457) TX_TASK: Wrote 30 bytes
I (13457) TX_TASK: Wrote 30 bytes
I (14987) FleetProvisioning: Received certificate with Id: 76ffa6d9fa97b04cb9c6ae8c1f6965580fdd0769c846cd94279c88383a291b78
I (14997) corePKCS11: Writing certificate into label "Device Cert".
I (14997) corePKCS11: Creating a 0x1 type object.
I (15457) TX_TASK: Wrote 30 bytes
I (17457) TX_TASK: Wrote 30 bytes
I (18237) coreMQTT: Ack packet deserialized with result: MQTTSuccess.
I (18237) coreMQTT: State record updated. New state=MQTTPublishDone.
I (18347) coreMQTT: De-serialized incoming PUBLISH packet: DeserializerResult=MQTTSuccess.
I (18347) coreMQTT: State record updated. New state=MQTTPubAckSend.
E (18347) FleetProvisioning: Received rejected response from Fleet Provisioning RegisterThing API.
E (18367) FleetProvisioning: Payload: {_ "statusCode": 400, "errorCode": "InvalidResult", "errorMessage": "Provisioning hook result is in an invalid format."}
Status: Succeeded
Test Event Name: (unsaved) test event
Response:
{
"statusCode": 200,
"body": "\"Hello from Lambda!\""
}
Function Logs:
START RequestId: 8e69eeb8-ec77-40a4-bd05-3213d979c594 Version: $LATEST
END RequestId: 8e69eeb8-ec77-40a4-bd05-3213d979c594
REPORT RequestId: 8e69eeb8-ec77-40a4-bd05-3213d979c594 Duration: 1.76 ms Billed Duration: 2 ms Memory Size: 128 MB Max Memory Used: 30 MB Init Duration: 104.07 ms
Request ID: 8e69eeb8-ec77-40a4-bd05-3213d979c594
I did give the certificateid, certificate pem, csr, serial number above used “test” on the console and the above log was the output.
But I’m not familiar with the testing the expected format? what is the correct way to do that on console?
This the code block from the sdk is reponsible for what is happening with the code and aws cloud platform interaction. what is interesting to me is when the “if” condition is satisfied why it is also trying to enter into “else if”
“Received accepted response from Fleet Provisioning CreateCertificateFromCsr API.” this message is printed on the log in my first message, then why it again going inside “else if” Logerror “Received rejected response from Fleet Provisioning RegisterThing API.” ?
I have already did this project "TLS_MUTUAL_AUTHENTICATION separately, but I’m wondering whether I can build on top of Fleet_Provisioning SDK. As the SDK has mqtt_operations.c file.