This paper presents an effective defense system against the increasing variety and sophistication of cyberattacks, particularly Denial-of-Service (DoS) attacks, in cloud computing environments. Leveraging the power of large-scale language models (LLMs), this novel defense architecture, called LLM-PD, proactively mitigates various DoS threats through language understanding, data analysis, task inference, action planning, and code generation. LLM-PD efficiently makes decisions through comprehensive data analysis and sequential reasoning, dynamically generating and deploying executable defense mechanisms. Furthermore, it flexibly evolves based on experience gained from previous interactions and adapts to new attack scenarios without additional training. Through case studies of three different DoS attacks, we demonstrate LLM-PD's superior defense effectiveness and efficiency compared to existing methods.