How to detect whether MySQL server is running as Amazon RDS
Try 

SELECT @@version;


I believe that Amazon has their own build of  MySQL and  would be apparent there.

EDIT 2012-05-30

@@version does not return a unique string, but it appears that all RDS instances have the same basedir/datadir/tmpdir, etc, so you could look at @@basedir and see if it matches /rdsdbbin/mysql/:

mysql&gt; select @@basedir;
+------------------+
| @@basedir        |
+------------------+
| /rdsdbbin/mysql/ |
+------------------+
1 row in set (0.00 sec)


This is not 100% definitive, but chances are pretty high that if the basedir is set to something like rdsdbbin, then it's an RDS instance.