AWS CloudFormation
User Guide (API Version 2010-05-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Function Declaration

You can use AWS CloudFormation intrinsic functions to provide complex values not available until runtime.

AWS CloudFormation intrinsic functions are special actions you use in your template to assign values to properties not available until runtime. Each function is declared with a double-quoted name, a single colon, and its arguments. When an argument is a literal string, it is enclosed in double quotes. If an argument is the result of a list of any kind, it is enclosed in brackets ("[ ]"). If an argument is the result of an intrinsic function or reference, it is enclosed in braces ("{ }").

The following example shows the function "Fn::GetAtt" being used to assign a value to the MyLBDNSName, which it does by retrieving the value of the attribute DNSName from the Elastic Load Balancing load balancer named MyLoadBalancer.

"Properties" : {
   "MyMyLBDNSName" : {
      "Fn::GetAtt" : [ "MyLoadBalancer", "DNSName" ]
   }
}

For more information about intrinsic functions, see Intrinsic Function Reference.