CloudFormation is used to define, provision, and manage a collection of related AWS resources. This collection is referred to as a CloudFormation stack. The stack’s template can be defined in YAML or JSON. Hence, the input to CloudFormation is a YAML file and the output is the provisioned AWS resources.
There are many sample CloudFormation templates available from AWS. You will probably never have to create a CloudFormation template from scratch. You can always download a sample and modify it to meet your requirements. These samples include templates for big data applications, including streaming applications, machine learning and deep learning applications, serverless applications, and many more.