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 questions
How to configure elastic beanstalk environment with a load balancer to support blue/green deployments?
asked 6 months agoHow do I use Amazon CloudFront with AWS Elastic Beanstalk as the origin?
Accepted AnswerUnable to delete my Elastic Beanstalk environment
asked 3 years agoElastic Beanstalk stuck aborting current environment operation
asked 5 months agoConfigure DNS record in CloudFormation for Elastic Beanstalk Environment
asked 17 days agoEnvironment named xxxxxx is in an invalid state for this operation.
asked 4 years agoHow to deploy to single instance Elastic Beanstalk worker environment using CodePipeline?
asked 8 months agoDo Elastic Beanstalk Web Server Environment Need A Public Elastic IP
asked 3 months agoCloudFormation cannot update tags on Elastic Beanstalk Environments
asked 3 years agoRoute53 - Manual Update of IP address for A record of EBS Environment
asked 2 months ago
No I do not use a load balancer, it is a Single Instance environment