added another way to specify credentials of amazon, instead of file