如何删除 AWS Cloudformation 文件中终端节点末尾的点

问题描述 投票:0回答:1
  MyPrimaryRecord:
    Type: AWS::Route53::RecordSet
    Properties:
      HostedZoneId: 2222222222222222
      Name: deneme.slhttnunlu.net
      Type: A
      Failover: PRIMARY
      TTL: '60'
      ResourceRecords:
        - !GetAtt WebServer.PublicIp
      SetIdentifier: Primary
      HealthCheckId: !Ref myHealthCheck

  MySecondaryRecord:
    Type: AWS::Route53::RecordSet
    Properties:
      HostedZoneId: 2222222222222222
      Name: deneme.slhttnunlu.net
      Type: A
      Failover: SECONDARY
      AliasTarget:
        DNSName: !Select [2, !Split ["/", !GetAtt S3FailBucket.WebsiteURL]]
        EvaluateTargetHealth: false
        HostedZoneId: Z3AQBSTGFYJSTF
      SetIdentifier: Secondary

我正在尝试使用yaml文件编写Route53服务的故障转移策略功能,我已经完成了所有内容,但是由于“.”,域路由过程无法工作。在 s3 存储桶端点地址的末尾。我怎样才能删除“。”在以下地址的末尾?

 slh-route53-ml.s3-website-us-east-1.amazonaws.com.

replace(".com.", ".com") 我尝试使用此功能,但不能。

amazon-web-services aws-cloudformation amazon-route53
1个回答
0
投票

根据AWS Well-architected框架,建议使用CloudFront和S3 Origin。这样,A 记录将如下所示:

  ARecordE7B57761:
    Type: AWS::Route53::RecordSet
    Properties:
      Name: stage.web-site.us.
      Type: A
      AliasTarget:
        DNSName:
          Fn::GetAtt:
            - Distribution830FAC52
            - DomainName
        HostedZoneId:
          Fn::FindInMap:
            - AWSCloudFrontPartitionHostedZoneIdMap
            - Ref: AWS::Partition
            - zoneId
      HostedZoneId: Z06403622UFM115xxxxxx

如果您托管静态网站并且希望获得更好的可用性,请添加新存储桶作为源并设置 CloudFront 源

我希望它能引导您找到解决方案。

© www.soinside.com 2019 - 2024. All rights reserved.