dynamodb connect function update