Q:

modifying cqlsh prompt to get unique identifier

Currently when I start up cqlsh, I get:
ubuntu@ip-172-31-83-106:~$ cqlsh
Connected to Test Cluster at 127.0.0.1:9042. 
[cqlsh 5.0.1 | Cassandra 3.11.4 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help. 
cqlsh> 

I want to be able to change 

cqlsh>

not something unique, like

ubuntu@ip-172-31-83-106>

and each time I run a query, the prompt will remain.  How can I do that? 

A:

CQLSH has very limited support for customization of the prompt.  The only custom thing that you can bring into prompt is the string that should be passed via CQLSH_PROMPT environment variable and that will be printed before cqlsh> string (see sources)
For example, if you start your CQLSH as 
CQLSH_PROMPT="$(whoami)@$(hostname)" cqlsh

then you'll gets something like this:
ubuntu@ip-172-31-83-106
cqlsh>

but that's all what you can do.