YAML AWSTemplateFormatVersion: "2010-09-09" Description: A sample template Resources: MyEC2Instance: Type: "AWS::EC2::Instance" Properties: ImageId: "ami-2f726546" InstanceType: t1.micro KeyName: testkey BlockDeviceMappings: - DeviceName: /dev/sdm Ebs: VolumeType: io1 Iops: 200 DeleteOnTermination: false VolumeSize: 20 MyEIP: Type: AWS::EC2::EIP Properties: InstanceId: !Ref MyEC2Instance
Resources
and Outputs
sections of the template.Resources
and Outputs
section.AWS::Include
transforms to work with template snippets that are stored separately from the main AWS CloudFormation template. You can store your snippet files in an Amazon S3 bucket and then reuse the functions across multiple templates.Outputs
section declares output values. For example, you can output the S3 bucket name for a stack to make the bucket easier to find.
YAML Outputs: Logical ID: Description: Information about the value Value: Value to return Export: Name: Value to export
You can use Output variables to:
aws cloudformation describe-stacks
command. The value of an output can include literals, parameter references, pseudo-parameters, a mapping value, or intrinsic functions.Export
names must be unique within a region.