AWS Certified Solutions Architect – Professional SAP-C01 – Question301

You have written a CloudFormation template that creates 1 Elastic Load Balancer fronting 2 EC2 Instances.
Which section of the template should you edit so that the DNS of the load balancer is returned upon creation of the stack?

A.
Parameters
B. Outputs
C. Mappings
D. Resources

Correct Answer: B

Explanation:

Explanation: You can use AWS CloudFormation’s sample templates or create your own templates to describe the AWS resources, and any associated dependencies or runtime parameters, required to run your application. In the following example, the output named BackupLoadBalancerDNSName returns the DNS name for the resource with the logical ID BackupLoadBalancer only when the CreateProdResources condition is true. (The second output shows how to specify multiple outputs.)
“Outputs” : { “BackupLoadBalancerDNSName” : { “Description”: “The DNSName of the backup load balancer”, “Value” : { “Fn::GetAtt” : [ “BackupLoadBalancer”, “DNSName” ]}, “Condition” : “CreateProdResources” }, “InstanceID” : { “Description”: “The Instance ID”, “Value” : { “Ref” : “EC2Instance” } } }
Reference:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outpu…