A CloudOps engineer is reviewing the following AWS CloudFormation template:
Why does creation of the stack fail?
PrivateDnsName is not a supported configurable property of AWS::EC2::Instance; it is a read-only resource attribute that can be retrieved with Fn::GetAtt. The supported instance setting for hostname behavior is PrivateDnsNameOptions, so specifying PrivateDnsName in Properties causes CloudFormation validation to fail.
PrivateDnsName
AWS::EC2::Instance
Fn::GetAtt
PrivateDnsNameOptions
Properties
Community Discussion