I have postgres 9.2 running in AWS EC2 (aws linux) instance.I followed documentation and tried to dopostgres=> ALTER USER Postgres WITH PASSWORD 'password';
ERROR: must be superuser to alter replication users
Something is odd here besides using an out-of-support version of PostgreSQL. I'm figuring that you'll have better luck asking your distro packager (i.e., Amazon) directly. That said the best way to change passwords with psql is the \password meta-command.
Most packages make the postgres user a superuser but apparently your distro thinks differently and you need to learn from them how things work.
David J.