How do I send data to a cloud server like Amazon EC2?

I need to able to connect to a remote server to push data/stats, as well as pull down information from the remote server. Note that this is not a multiplayer networking request.

Are there are any libraries or packages meant for communicating via an HTTP or HTTPS JSON API on a remote webserver?

There is no general valid definition of “a cloud service”. There are some standardized protocols which they might use. Most define their own set of commands / services you can use. For amazon cloud service just look at their API page. You basically have those options in general:

  • Look up the API reference, see how a certain request should be done and use the WWW class in Unity to do the http requests.
  • The above point might be extended by using additional helpers like a JSON / XML parser / builder to actually prepare the data you have to send and to parse the result you get back.
  • Find a managed .NET library or framework (probably written in C#) for your desired API. In case of amazon you will find everything on their documetation pages.

Be prepared that things like that don’t work like Unity. You don’t just drag a cube over here and attach a script there. Read the documentation of the API to see what you can actually do and then make yourself clear what you actually want to do with the service they provide.

Since the topic of this question only scratches Unity it’s “almost” an off-topic question. It’s also way to unspecific.