【问题标题】:No Ouput when creating Cloudformation stack with an Outputs section使用输出部分创建 Cloudformation 堆栈时无输出
【发布时间】:2020-07-26 09:39:43
【问题描述】:

使用 S3 存储桶创建堆栈时,创建此堆栈时,我没有从 Cloudformation 获得输出。我错过了什么?

{                 
    "Resources" : {
        "S3BKT" : {
            "Type" : "AWS::S3::Bucket",
            "DeletionPolicy" : "Retain",
            "Properties" : {
                "AccessControl" : "PublicRead",
                "WebsiteConfiguration" : {
                    "IndexDocument" : "index.html",
                    "ErrorDocument" : "error.html"
                }
            }
        }
    },
    "Outputs" : {
        "WebsiteURL" : {
            "Value" : { "Fn::GetAtt" : [ "S3BKT", "WebsiteURL" ] },
            "Description" : "URL for website hosted on S3"
            }
        }
    }

【问题讨论】:

  • 模板没有问题。您的问题必须来自其他地方。

标签: json amazon-cloudformation


【解决方案1】:

上传了这个模板,出现错误:

不支持 Fn::GetAtt 中的属性类型访问控制

删除 PublicRead 并替换为 PublicReadWrite ,我得到了输出。再次使用 PublicRead 重新运行模板并获得输出。

超级奇怪。但它奏效了。感谢 Marcin 的回复!

【讨论】:

    猜你喜欢
    • 2020-09-17
    • 2020-10-31
    • 2016-08-13
    • 2017-05-16
    • 2021-12-09
    • 2022-08-17
    • 2020-04-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多