Replying to my own post, it seems that openssl/wget are missing the CA certificates. So I took the certificates that were installed in the first linux box I found (usually in /etc/ssl/cert/) and copied them in the galileo ... and it worked. Here is the command line I used:
wget --ca-certificate=/media/realroot/ca-bundle.crt https://aws.amazon.com
Oh, and by the way, don't forget to set the right time otherwise wget will complain that the certificate is not yet valid. Use the following command to set the current date:
date -s "YYYYMMDD HH:mm:ss"