AWS CloudFormation is a service that allows you to define your infrastructure in code (using JSON or YAML templates) and provision it in a repeatable and automated way.
Resources:
MyEC2Instance:
Type: 'AWS::EC2::Instance'
Properties:
ImageId: 'ami-xxxxxxxx'
InstanceType: 't2.micro'