Ethernet secure ENCj2860 for aws cloud

Hi community
how are you?
I hope you are fine

I need your support for modifying the code of this example for the ethernet shield encj2860

for working with AWS IOt ore…

They decided to dismiss the google iot core service so we must migrate on aws.
The lib I have used now it is not necessary anymore…

Instead I have found and tested two examples working for esp32 but just with the wifisecure connection…

One example is using the pusubclient lib here…

one example it is using another

Considering what you did and what is possible to recycle which is the best thing to do ?

Thanks a lot for your support