Amortized Cost Optimization in Federated Cloud Environments: Maximizing Efficiency and Minimizing Expenses