Amazon web services 记录集的AWS cfn资源创建失败
我想使用cloudformation部署一个静态网站,但在创建记录集时遇到了问题。堆栈创建成功,直到资源部分中的托管区域。我不确定为什么为托管区域创建记录集时会出现问题 错误:以下资源未能创建:[记录集]Amazon web services 记录集的AWS cfn资源创建失败,amazon-web-services,yaml,amazon-cloudformation,Amazon Web Services,Yaml,Amazon Cloudformation,我想使用cloudformation部署一个静态网站,但在创建记录集时遇到了问题。堆栈创建成功,直到资源部分中的托管区域。我不确定为什么为托管区域创建记录集时会出现问题 错误:以下资源未能创建:[记录集] --- AWST模板格式版本:“2010-09-09” 描述:“假设您已经在Amazon Route 53注册了托管区域,此Cfn模板用于创建静态站点” #元数据: #“AWS::CloudFormation::Interface”: #参数组: #-标签: #默认值:“HostedZone
---
AWST模板格式版本:“2010-09-09”
描述:“假设您已经在Amazon Route 53注册了托管区域,此Cfn模板用于创建静态站点”
#元数据:
#“AWS::CloudFormation::Interface”:
#参数组:
#-标签:
#默认值:“HostedZone name”
#参数:
#-HostedZoneName
参数:
HostedZoneName:
描述:“现有Amazon Route 53托管区域的DNS名称”
类型:字符串
允许模式:“(?!-)[a-zA-Z0-9-.]{1,63}(?您缺少类型:A
属性,您必须用HostedZoneId
替换HosteZoneName
。此外,删除区域
它在全局路由53中没有任何用处。单击错误以展开它时是否会提供更多信息?我已经做了更改,但仍然得到一个错误“在CloudCrew.net区域中不允许使用DNS名称为z3b9u6qmuquywf.的RRSet。“@MrD我在Cloudformation中遇到路由53的问题。我使用了python boto3。希望能有所帮助
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Assuming that you already have a Hosted Zone registered with Amazon Route 53, this Cfn template is to create a static site'
# Metadata:
# 'AWS::CloudFormation::Interface':
# ParameterGroups:
# - Label:
# default: 'HostedZone name'
# Parameters:
# - HostedZoneName
Parameters:
HostedZoneName:
Description: "The DNS name of an existing Amazon Route 53 hosted zone"
Type: String
AllowedPattern: "(?!-)[a-zA-Z0-9-.]{1,63}(?<!-)"
Default: "thecloudcrew.net"
Resources:
S3Bucket:
Type: AWS::S3::Bucket
Properties:
AccessControl: PublicRead
BucketName: !Ref HostedZoneName
WebsiteConfiguration:
IndexDocument: index.html
ErrorDocument: error.html
LoggingConfiguration:
DestinationBucketName: !Ref S3LoggingBucket
LogFilePrefix: logs
WWWS3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub
- www.${domain}
- { domain: !Ref HostedZoneName}
WebsiteConfiguration:
RedirectAllRequestsTo:
HostName: !Ref HostedZoneName
S3LoggingBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub
- ${domain}.logs
- { domain: !Ref HostedZoneName}
AccessControl: LogDeliveryWrite
HostedZone:
Type: "AWS::Route53::HostedZone"
Properties:
HostedZoneConfig:
Comment: "My Hosted zone for thecloudcrew.net"
HostedZoneTags:
-
Key: Name
Value: thecloudcrew
Name: !Ref HostedZoneName
RecordSet: #FIXME
Type: "AWS::Route53::RecordSet"
Properties:
AliasTarget:
DNSName: s3-website.us-east-2.amazonaws.com
HostedZoneId: Z2O1EMRO9K5GLX
Comment: "RecordSet for static website"
HostedZoneId: !Ref HostedZone #TODO
Name: !Ref HostedZone
Type: A
#Region: 'us-east-2'
# SetIdentifier: String
# TTL: String
# Weight: Integer