Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon cloudformation 云形成的托管区域Id_Amazon Cloudformation_Aws Cloudformation Custom Resource - Fatal编程技术网

Amazon cloudformation 云形成的托管区域Id

Amazon cloudformation 云形成的托管区域Id,amazon-cloudformation,aws-cloudformation-custom-resource,Amazon Cloudformation,Aws Cloudformation Custom Resource,我有两个同名的托管区域(一个是私有的,另一个是公共的),我试图在我的cloudformation模板中使用公共托管区域id,以便它在创建堆栈时注册。每次都失败了 没有这样的托管区域ID 当使用区域名称时,它通常起作用(在两个相同名称之前)。我无法确定问题的起因。我拥有AWS帐户的完全访问权限,cloudformation正在使用我的cred运行。以下是模板: PublicHostedZone: Type: String Description: Provide existing Amazon R

我有两个同名的托管区域(一个是私有的,另一个是公共的),我试图在我的cloudformation模板中使用公共托管区域id,以便它在创建堆栈时注册。每次都失败了

没有这样的托管区域ID

当使用区域名称时,它通常起作用(在两个相同名称之前)。我无法确定问题的起因。我拥有AWS帐户的完全访问权限,cloudformation正在使用我的cred运行。以下是模板:

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

谢谢大家!

HostedZoneID
只是一个类似于
Z23ABC4XYZL05B
的id,不应该与
一起加入,谢谢。我将HostedZoneName更改为ID,忘记了所有关于“.”的内容。它有效吗?还是同一个问题?在我在正确的位置删除了“加入”和“.”,并在一些有效的位置添加了HostedZoneName:)