Hi,
recently ive learned a lot about JITP (aws just in time provisioning). I can try to help.
First of all you need to know there is a difference between JITP and JITR. For JITR you need lambda that will activate certificate and device on first connection. JITP does not require lambda and activate device certificate on first connection.
Next thing is that you need aws account with IAM roles etc. All about it you can learn from this post:
https://aws.amazon.com/blogs/iot/settin ... -iot-core/
The last and very important thing is that you need to provide CA certificate in esp32 device, because aws with it will know how to proxy requests. To be honest i dont know how it is implemented in espressif aws-iot library because im working with AWSFreeRTOS, but procedure is the same.