Which code snippet below returns the URL of a load balanced web site created in CloudFormation…?

Which code snippet below returns the URL of a load balanced web site created in
CloudFormation with an AWS::ElasticLoadBalancing::LoadBalancer resource name
“ElasticLoad Balancer”?

Which code snippet below returns the URL of a load balanced web site created in
CloudFormation with an AWS::ElasticLoadBalancing::LoadBalancer resource name
“ElasticLoad Balancer”?

A.
“Fn::Join” : [“”. [ “http://”, {“Fn::GetAtr” : [ “ElasticLoadBalancer”,”DNSName”]}]]

B.
“Fn::Join” : [“.”, [ “http://”, {“Ref” : “ElasticLoadBalancerDNSName”}]]

C.
“Fn::Join” : [“”. [ “http://”, {“Ref” : “ElasticLoadBalancerUrl”}]]

D.
“Fn::Join” : [“”. [ “http://”, {“Fn::GetAtr” : [ “ElasticLoadBalancer”,”Url”]}]]



Leave a Reply 12

Your email address will not be published. Required fields are marked *


seenagape

seenagape

Correct answer is D

plattr

plattr

I cant see any references to a “Url” attribute in the documentation so answer must be A.

Ankit Shah

Ankit Shah

A is also long but its should be GetAtt

Vishal Joshi

Vishal Joshi

It has to be A. URL by definition includes protocol too (http/https). The join operation in given options already concatenating “http” protocol so all is needed to attach a DNS name and hence answer A fulfills this request.

certified

certified

It’s always hilarious seeing people post what they think is the answer here and have no clue. Why on EARTH would you think that it’s D?

Have you never made a cloudformation template with a load balancer? Have you never looked at what properties are exposed by a load balancer?

If you are just guessing, don’t put it down in the comments as an answer. It’s just a waste of everyones time.

BTW, the answer is OBVIOUSLY A.