| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
AWS CloudFormation Functions enable you to accomplish several complex operations within your template.
AWS CloudFormation provides functions that you can use to pass values that are not available until runtime. You specify a
function inline with "Fn::function-name" supplying whatever arguments it needs
inline. The arguments can be literal strings or lists of strings, a parameter reference, a pseudo parameter, or
the value returned from another function.
In the following example, the value for the URL output is provided at stack creation time by the
Fn::GetAtt function, based on the value for DNSName assigned to
the MyLoadBalancer load balancer:
"Outputs" : {
"URL" : {
"Value" : { "Fn::GetAtt" : [ "MyLoadBalancer", "DNSName" ] }
}
}Currently, AWS CloudFormation supports the following functions:
| Name | Purpose |
|---|---|
|
The base64 encoding of the argument. | |
|
Returns the value of a key from the specified Mapping. | |
|
Returns the attribute value of the specified resource. | |
|
Get the Availability Zones where you can create AWS CloudFormation stacks. | |
|
Concatenation of the elements of the second argument, separated by the first. | |
|
Return a resource or value based on a logical name or parameter. |
Many of the sample templates make use of intrinsic functions (see Example Templates). Also, for technical details about the format of intrinsic functions, see Function Declaration.