
The very first thing to ensure that the unwanted or unauthorized traffic doesn't get in into the instances using Security Group.
What is a Security Group?
It is a AWS firewall solution which filters the incoming and outgoing traffic from an instance.
Filtering is done based upon the ip protocols,ports...