Imported from https://github.com/congcui2007/AWS