Writing a distributed application on AWS