some of the code for AWS