Feeding AMS1117-5V with 3.3V
First issue: a 5V regulator is designed to output 5V, not 3.3V, nor any other voltage. Don't use an AMS1117-5V for any output voltage different than 5V.

Second issue: every linear regulator needs some headroom. A practical 3.3V regulator needs slightly higher input voltage. This is called the dropout voltage. Dropout voltage of the AMS1117 is around 1.1 V, so to get stable 3.3 you need to supply it with at least 4.4 V.