make work on AWS, implement using gateway url