I'm planning on creating a tor hidden service(in the context of a research project) and am wondering how resilient is it against common (D)DoS attacks(i.e. DNS amplification, UDP flood, etc.) given that the real network address of the server is not known to the attacker? Is it possible to limit the number of open connections to the service via tor in order to avoid resource(open sockets/bandwidth) exhaustion?
The examples you mention do not apply: Tor only works with TCP streams, not UDP.
It is probably easier to overload the Tor that hosts the Hidden Service than the actual web server behind it, by just creating lots of connections. Setting up a circuit is much more work than serving up a simple web page.