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?
Writing custom scripts for the AWS CLI
Directly configuring services using AWS SDK calls
Using the AWS Management Console for manual setup
Defining the infrastructure in a CloudFormation template