Eu tive um problema semelhante, mas não estava necessariamente relacionado à AWS.
Eu procurei em /etc/profile
e encontrei export TMOUT=$((60*60))
. A partir dos documentos do bash :
If set to a value greater than zero, TMOUT is treated as the default timeout for the read builtin (see Bash Builtins). The select command (see Conditional Constructs) terminates if input does not arrive after TMOUT seconds when input is coming from a terminal.
In an interactive shell, the value is interpreted as the number of seconds to wait for a line of input after issuing the primary prompt. Bash terminates after waiting for that number of seconds if a complete line of input does not arrive.
A adição de unset TMOUT
a $USER/.profile
(ou .bash_profile
, .bash_login
, etc.) a corrigiu.