This document presents a latency-aware max-min algorithm (LAM) for resource allocation in cloud computing, addressing challenges like fluctuating user demands and quality of service (QoS) requirements. The proposed algorithm optimizes resource allocation by considering user priorities, which are assessed using the Analytic Hierarchy Process (AHP). Performance evaluations indicate that LAM outperforms existing algorithms, ensuring better resource consumption and infrastructure performance in cloud environments.