added code to allow setting of the KINESIS_ENDPOINT