@Kiran Dasari
t2.micro instance has only 1 vCPU core, but apparently RHEL OpenJDK assumes multi core machine by default. There's a github issue (not for NiFi, but Elasticsearch) suggesting use '-XX:-AssumeMP' to disable this assumption.
You can add JVM argument from <NIFI_HOME>/conf/bootstrap.conf. I tried this option with t2.micro. Without this, I got the same error as you reported. By adding the option NiFi proceeded startup further, but I also needed to reduce JVM heap size to have NiFi up and running. Changed bootstrap.conf as follows:
# JVM memory settings: from 512m to 256m
java.arg.2=-Xms256m
java.arg.3=-Xmx256m
# Add this to disable AssumeMP
# https://github.com/elastic/elasticsearch/issues/22245
java.arg.15=-XX:-AssumeMP
NiFi is running without issue for 30 minutes. I hope it's longer enough to confirm that the configuration can address your issue, too.
Thanks,
Koji