You are writing an AWS CloudFormation template, and you want to assign values to properties that will not be available until runtime.
You know that you can use intrinsic functions to do this but are unsure which part of the template they can use.
Which of the following is correct in describing how you can currently use intrinsic functions in an AWS CloudFormation template?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - B.
As per AWS documentation:
You can use intrinsic functions only in specific parts of a template.
Currently, you can use intrinsic functions in resource properties, outputs, metadata attributes, and update policy attributes.
You can also use intrinsic functions to create stack resources conditionally.
Hence, B is the correct answer.
For more information on intrinsic function, please refer to the below link.
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.htmlIntrinsic functions can be used in an AWS CloudFormation template to assign dynamic values to properties that are not available until runtime. These functions are evaluated by CloudFormation during stack creation or update, and they enable the definition of more dynamic templates that can adapt to changing requirements.
Regarding the parts of the template where intrinsic functions can be used, the correct answer is B: you can use intrinsic functions only in specific parts of a template. Specifically, intrinsic functions can be used in:
Intrinsic functions cannot be used in other parts of the template, such as the AWSTemplateFormatVersion or Description sections, as these are static metadata that do not depend on runtime values.
Some examples of intrinsic functions are:
Overall, the use of intrinsic functions in AWS CloudFormation templates provides a powerful way to create more flexible and dynamic infrastructure as code, enabling teams to manage their resources with more agility and efficiency.