Provisioning of multi-tier applications in cloud environments raises new challenges not addressed by prior work on provisioning single-tier applications, on dynamic balancing or on resource allocation in other types of distributed systems. Flexible and general automatic mechanisms are needed to determine how much virtual resources need to be allocated to each tier of the application minimizing resources consumption and meeting the service level agreement. Both the research community and the main cloud providers are proposing this kind of solutions but most of them are application-specific, provider-specific, centralized and focused only on batch applications. This paper presents an automatic provisioning solution for multi-tier applications called AutoMAP. The proposed mechanism is general (application and provider independent), it can be implemented with different architectures from centralized to distributed even being provided as a service, and it is able to deal with both batch and interactive applications allowing horizontal and vertical scaling (based on replication and on resizing respectively). A first prototype of AutoMAP has been implemented to demonstrate its efficiency with experimental results using a widely used benchmark, RUBiS, on a real cloud architecture.