- Newest
- Most votes
- Most comments
Are you using an Elastic Load Balancer? If so specify the value of the hosted zone ID for the load balancer.
You can do this command to get the CanonicalHostedZoneNameID
aws elb describe-load-balancers --region eu-west-1
ELB load balancer
Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the hosted zone ID:
* Service Endpoints table in the "Elastic Load Balancing Endpoints and Quotas" topic in the Amazon Web Services General Reference: Use the value that corresponds with the region that you created your load balancer in. Note that there are separate columns for Application and Classic Load Balancers and for Network Load Balancers.
-
AWS Management Console: Go to the Amazon EC2 page, choose Load Balancers in the navigation pane, select the load balancer, and get the value of the Hosted zone field on the Description tab.
-
Elastic Load Balancing API: Use DescribeLoadBalancers to get the applicable value. For more information, see the applicable guide: Classic Load Balancers: Use DescribeLoadBalancers to get the value of CanonicalHostedZoneNameID.
Application and Network Load Balancers: Use DescribeLoadBalancers to get the value of CanonicalHostedZoneID.
- CloudFormation Fn::GetAtt intrinsic function: Use the Fn::GetAtt intrinsic function to get the applicable value:
Classic Load Balancers: Get CanonicalHostedZoneNameID.
Application and Network Load Balancers: Get CanonicalHostedZoneID.
- AWS CLI: Use describe-load-balancers to get the applicable value. For more information, see the applicable guide:
Classic Load Balancers: Use describe-load-balancers to get the value of CanonicalHostedZoneNameID.
Application and Network Load Balancers: Use describe-load-balancers to get the value of CanonicalHostedZoneID.*
OK you mentioned its a single instance environment but i noticed in your CF template you are getting the DNS name like this:
DNSName: !GetAtt AppEnvironment.EndpointURL
However in single instance environments that will give you the IP address NOT the CNAME
Fn::GetAtt
The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.
EndpointURL
For load-balanced, autoscaling environments, the URL to the load balancer. For single-instance environments, the IP address of the instance.
Example load balancer URL:
awseb-myst-myen-132MQC4KRLAMD-1371280482.us-east-2.elb.amazonaws.com
Example instance IP address:
192.0.2.0
Relevant content
- asked 9 months ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 17 days ago
No I do not use a load balancer, it is a Single Instance environment