AWS CloudFormation Template format error: Unresolved resource dependencies <s3 bucket> in the Resources block of the template

AWS CloudFormation Template format error: Unresolved resource dependencies <s3 bucket> in the Resources block of the template

我想做的就是按照本指南在 AWS https://aws-quickstart.github.io/quickstart-atlassian-jira/

上启动 Atlassian 服务 (Jira/JSM/Confluence) 和 运行

我已经准确地遵循了所有细节,目前正处于需要在 cloudformation 上创建堆栈的阶段。当我粘贴到 .yaml url 时,我在标题中收到错误,指出资源存在问题。我已经查看过了,我不确定是什么问题,将不胜感激。

Resources:
  VPCStack:
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: !Sub
        - https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}submodules/quickstart-atlassian-services/templates/quickstart-vpc-for-atlassian-services.yaml
        - QSS3Region: !If
            - GovCloudCondition
            - s3-us-gov-west-1
            - s3
      Parameters:
        AccessCIDR: !Ref 'AccessCIDR'
        AvailabilityZones: !Join
          - ','
          - !Ref 'AvailabilityZones'
        ExportPrefix: !Ref 'ExportPrefix'
        KeyPairName: !Ref 'KeyPairName'
        PrivateSubnet1CIDR: !Ref 'PrivateSubnet1CIDR'
        PrivateSubnet2CIDR: !Ref 'PrivateSubnet2CIDR'
        PublicSubnet1CIDR: !Ref 'PublicSubnet1CIDR'
        PublicSubnet2CIDR: !Ref 'PublicSubnet2CIDR'
        VPCCIDR: !Ref 'VPCCIDR'
        BastionHostRequired: !Ref 'BastionHostRequired'

  JiraDCStack:
    DependsOn: VPCStack
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: !Sub
        - https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}templates/quickstart-jira-dc.template.yaml
        - QSS3Region: !If ["GovCloudCondition", "s3-us-gov-west-1", "s3"]
      Parameters:
        CatalinaOpts: !Ref 'CatalinaOpts'
        CidrBlock: !Ref 'AccessCIDR'
        CloudWatchIntegration: !Ref 'CloudWatchIntegration'
        ClusterNodeInstanceType: !Ref 'ClusterNodeInstanceType'
        ClusterNodeMax: !Ref 'ClusterNodeMax'
        ClusterNodeMin: !Ref 'ClusterNodeMin'
        ClusterNodeVolumeSize: !Ref 'ClusterNodeVolumeSize'
        CustomDnsName: !Ref 'CustomDnsName'
        DBEngine: !Ref DBEngine
        DBEngineVersion: !Ref DBEngineVersion
        DBInstanceClass: !Ref 'DBInstanceClass'
        DBIops: !Ref 'DBIops'
        DBMasterUserPassword: !Ref 'DBMasterUserPassword'
        DBMaxIdle: !Ref 'DBMaxIdle'
        DBMaxWaitMillis: !Ref 'DBMaxWaitMillis'
        DBMinEvictableIdleTimeMillis: !Ref 'DBMinEvictableIdleTimeMillis'
        DBMinIdle: !Ref 'DBMinIdle'
        DBMultiAZ: !Ref 'DBMultiAZ'
        DBPassword: !Ref 'DBPassword'
        DBPoolMaxSize: !Ref 'DBPoolMaxSize'
        DBPoolMinSize: !Ref 'DBPoolMinSize'
        DBRemoveAbandoned: !Ref 'DBRemoveAbandoned'
        DBRemoveAbandonedTimeout: !Ref 'DBRemoveAbandonedTimeout'
        DBStorage: !Ref 'DBStorage'
        DBStorageEncrypted: !Ref 'DBStorageEncrypted'
        DBStorageType: !Ref 'DBStorageType'
        DBTestOnBorrow: !Ref 'DBTestOnBorrow'
        DBTestWhileIdle: !Ref 'DBTestWhileIdle'
        DBTimeBetweenEvictionRunsMillis: !Ref 'DBTimeBetweenEvictionRunsMillis'
        DeploymentAutomationRepository: !Ref 'DeploymentAutomationRepository'
        DeploymentAutomationBranch: !Ref 'DeploymentAutomationBranch'
        DeploymentAutomationKeyName: !Ref 'DeploymentAutomationKeyName'
        DeploymentAutomationPlaybook: !Ref 'DeploymentAutomationPlaybook'
        DeploymentAutomationCustomParams: !Ref 'DeploymentAutomationCustomParams'
        ExportPrefix: !Ref 'ExportPrefix'
        HostedZone: !Ref 'HostedZone'
        InternetFacingLoadBalancer: !Ref 'InternetFacingLoadBalancer'
        JiraProduct: !Ref 'JiraProduct'
        JiraVersion: !Ref 'JiraVersion'
        JvmHeapOverride: !Ref 'JvmHeapOverride'
        KeyPairName: !Ref 'KeyPairName'
        MailEnabled: !Ref 'MailEnabled'
        QSS3BucketName: !Ref 'jira-bucket-aws'
        QSS3KeyPrefix: !Ref 'QSS3KeyPrefix'
        SSLCertificateARN: !Ref 'SSLCertificateARN'
        TomcatAcceptCount: !Ref 'TomcatAcceptCount'
        TomcatContextPath: !Ref 'TomcatContextPath'
        TomcatDefaultConnectorPort: !Ref 'TomcatDefaultConnectorPort'
        TomcatEnableLookups: !Ref 'TomcatEnableLookups'
        TomcatMaxThreads: !Ref 'TomcatMaxThreads'
        TomcatMinSpareThreads: !Ref 'TomcatMinSpareThreads'
        TomcatProtocol: !Ref 'TomcatProtocol'
        TomcatRedirectPort: !Ref 'TomcatRedirectPort'
        BastionHostRequired: !Ref 'BastionHostRequired'

您缺少模板参数部分。如果您安装了 AWS CLI,则可以 运行 aws cloudformation validate-template--template-body file://jira-cfn.yaml--template-url https://path.to/your/cfn/template.yaml 来检查模板错误。如果您转到编辑器并在模板中 load/paste,您还可以 运行 从 CloudFront 控制台进行验证。

运行 下面对 validate the template 的命令产生了这个输出(我将你的模板保存为 jira-cfn.yaml 在当前工作目录中):

aws cloudformation validate-template --template-body file://jira-cfn.yaml

An error occurred (ValidationError) when calling the ValidateTemplate operation: Template format error: Unresolved resource dependencies 
[
TomcatEnableLookups, 
DBIops, 
SSLCertificateARN, 
QSS3KeyPrefix, 
JiraProduct, 
TomcatMinSpareThreads, 
DBMaxWaitMillis, 
DBStorageEncrypted, 
BastionHostRequired, 
DBTestOnBorrow, 
DeploymentAutomationPlaybook, 
MailEnabled, 
DBMultiAZ, 
JiraVersion, 
QSS3BucketName, 
JvmHeapOverride, 
DBRemoveAbandoned, 
DBInstanceClass, 
DBMasterUserPassword, 
jira-bucket-aws, 
CloudWatchIntegration, 
ClusterNodeInstanceType, 
DBMinIdle, 
DBPassword, 
ClusterNodeMin,
DeploymentAutomationCustomParams,
DBStorage,
TomcatMaxThreads, 
InternetFacingLoadBalancer, 
DeploymentAutomationBranch, 
ClusterNodeMax, 
DBMaxIdle, 
TomcatAcceptCount,
DBStorageType,
DBEngine,
AccessCIDR, 
TomcatDefaultConnectorPort, 
DBMinEvictableIdleTimeMillis, 
DeploymentAutomationKeyName, 
TomcatRedirectPort, 
DBTestWhileIdle, 
HostedZone, 
CatalinaOpts, 
KeyPairName, 
CustomDnsName, 
TomcatContextPath, 
DBRemoveAbandonedTimeout, 
ClusterNodeVolumeSize, 
DBPoolMinSize, 
DBTimeBetweenEvictionRunsMillis, 
DBEngineVersion, 
ExportPrefix, 
DBPoolMaxSize, 
DeploymentAutomationRepository, 
TomcatProtocol
] in the Resources block of the template