Well, I would prefer to do the binding with JNDI using this on your datasource.xml file
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/testdb" resource-ref="true"/>
You can try not to declare the datasource in the context.xml file. Instead of that, you will automatically inject it with the app:bind command through the CloudBees SDK. In this way you are sure that the datasource is correctly declared.
You should then delete this part of your context.xml file
<Resource name="jdbc/testd" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="testus" password="password"
url="ec2-23-21-211-172.compute-1.amazonaws.com"
driverClassName="com.mysql.jdbc.Driver" />
So, it should look like this:
<Context>
<Loader delegate="true" />
</Context>