write aws config to json file, func tobe moved to config module