set proper endpoint for aws