Fixing bugs caused by AWS API changes