Connect an Uno WiFi Rev 2 to a MQTT Broker via TLS/SSL

How can i connect Arduino Uno Wifi REV2 with AWS (Amazon Web Server) for an IoT application. I tried following this tutorial to connect to AWS Iot and kept getting errors: https://docs.arduino.cc/tutorials/mkr-wifi-1010/securely-connecting-an-arduino-mkr-wifi-1010-to-aws-iot-core.
I'm having a problem with the key is too large for my Arduino. What should I do? The bug is:
Sketch uses 207536 bytes (426%) of program storage space. Maximum is 48640 bytes.
text section exceeds available space in board
Global variables use 16050 bytes (261%) of dynamic memory, leaving -9906 bytes for local variables. Maximum is 6144 bytes.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board Arduino Uno WiFi Rev2.

Most probably you did something wrong. My guess is that you copied to much of the downloaded file (not just the section between "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----".

But BTW: that tutorial is for an MKR1010 and not an UNO WiFi Rev 2. Why do you think that this board with much less resources can handle the same?