Test/Cloud

CloudFormation templates

kiostory 2019. 3. 30. 16:51

* A basic Template contains 5 Sectors

1. Description

2. Parameters

3. Mappings

4. Resources

5. Outputs


1. Description

- Template parameters holds a value and contain a list of attributes

   that define its value.

- They are used in conjunction with

         Fn : : GetAtt   in the Resources section

2. Parameters

3. Mappings

- Mappings tell the template which base AMI to use in which region.

- Mappings can be used in conjunction parameters to ensure that Regional settings are met.

4. Resources

- This is where your ECW instances, S3 buckets, ELB's and any other type of resources go.

5. Outputs

- Return values produced by the template once launce is successfully complated.






* a bare borns Example:

{

"AWSTemplateFormatVersion" : "version date"

"Description" : "Valid JSON strings up to 4K",


"Parameters" : {

keys and values

},


"Mappings" : {

keys and values

},


"Resources" : {

keys and values

},


"Outputs" : {

keys and values

}

}





* Build from Examples

- AWS already has lots of example templates ready for you to look at and build from.

http://aws.amazon.com/cloudformation/aws-cloudformation-templates/





* Modify and customize the templates

http://www.jsoneditoronline.org

http://jsonlint.com