You are a Machine Learning Engineer at a technology company that uses Amazon EC2 instances to train and deploy machine learning models. The company needs to optimize the use of EC2 instances for both training and inference to ensure cost-effectiveness and high performance. Which combination of strategies should you implement to achieve these goals?