A company wants to automate the deployment of their cloud infrastructure to ensure consistent and repeatable setups across multiple environments. Which of the following is the BEST method they should use?
Using the AWS Management Console for manual setup
Writing custom scripts for the AWS CLI
Defining the infrastructure in a CloudFormation template
Directly configuring services using AWS SDK calls