首页 > 解决方案 > CloudFormation 的托管区域 ID

问题描述

我有 2 个同名的托管区域(一个是私有的,另一个是公共的),我正在尝试在我的 cloudformation 模板中使用公共托管区域 ID,以便在创建堆栈时进行注册。每次抱怨失败

没有这样的托管区域 ID

使用区域名称时,它曾经可以工作(在 2 个相同名称之前)。我无法确定可能导致问题的原因。我拥有 AWS 账户的完全访问权限,并且 cloudformation 正在以我的信誉运行。下面是模板:

PublicHostedZone:
Type: String
Description: Provide existing Amazon Route 53 public hosted zone
AllowedValues:
  - xxxxxxxxxxxxxxxxx
Default: xxxxxxxxxxxxxxxxx 

Route53Publicrecord:
Type: 'AWS::Route53::RecordSet'
Properties:
  HostedZoneID: !Join 
    - ''
    - - !Ref PublicHostedZone
      - .
  Comment: DNS name for load balancer.
  Name: !Join 
    - ''
    - - !Ref InstanceName
      - .
      - !FindInMap 
        - RegionMap
        - !Ref 'AWS::Region'
        - DNSregion
      - .
      - !Ref PublicHostedZone
      - .
  Type: A
  AliasTarget:
    HostedZoneId: !Join 
      - ''
      - !FindInMap 
        - RegionMap
        - !Ref 'AWS::Region'
        - DNSHostedZoneId        
    DNSName: !Ref ALBName

谢谢!

标签: amazon-cloudformationaws-cloudformation-custom-resource

解决方案


推荐阅读