The problem simply got resolved when I removed this line
UTL_SMTP.HELO(c, 'xxx.awsapps.com');
And added this line before UTL_SMTP.AUTH
UTL_SMTP.EHLO(c, 'xxx.awsapps.com');
It seems the handshaking was not done correctly which was causing to throw 504 The requested authentication mechanism is not supported