How to setup an AWS EC2 instance to prevent WordPress hacker attacks

How to setup an AWS EC2 instance to prevent WordPress hacker attacks