No operating system can prevent a DDoS attack. Protecting against this type of attach requires something to intercept traffic that is going to your server. AWS has a feature for this which can be found
here (I don't know any specifics since I just looked it up online).
__________________