Updated with support for AWS, tested.