【问题标题】:ValidateTemplate operation: [/Resources/S3Bucket/Outputs] 'null' values are not allowed in templatesValidateTemplate 操作:[/Resources/S3Bucket/Outputs] 模板中不允许使用 \'null\' 值
【发布时间】:2023-01-10 02:37:00
【问题描述】:

我很难弄清楚为什么会出错。有人能帮我吗?

AWSTemplateFormatVersion:“2010-09-09”

说明:Cafe S3模板

资源:

S3 桶:

Type: AWS::S3::Bucket
Properties:
  WebsiteConfiguration:
    IndexDocument: index.html
DeletionPolicy: Retain

Outputs:

网址:

Value: !GetAtt
  - S3Bucket
  - WebsiteURL

说明:托管在 S3 上的网站的 URL

【问题讨论】:

    标签: amazon-web-services aws-cloud9


    【解决方案1】:

    你能解决这个问题吗?我看到的唯一问题是 YAML 格式。

    请尝试以下操作:

    AWSTemplateFormatVersion: "2010-09-09"
    Description: Cafe S3 template
    Resources:
     S3Bucket:
        Type: AWS::S3::Bucket
        DeletionPolicy: Retain
        Properties:
          WebsiteConfiguration:
           IndexDocument: index.html
    Outputs:
      WebsiteURL:
        Value: !GetAtt
          - S3Bucket
          - WebsiteURL
        Description: URL for website hosted on S3
    

    可以在 AWS 文档中找到用于 S3 网站托管的 YAML example 模板。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-02
      • 2014-07-30
      • 2018-03-09
      • 1970-01-01
      • 2012-08-09
      • 2012-01-03
      • 2021-02-10
      • 2021-01-01
      相关资源
      最近更新 更多