gpt4 book ai didi

amazon-web-services - 拥有 AWS SNS 时无法更新 cloudformation 堆栈 :Topic Resource

转载 作者:行者123 更新时间:2023-12-03 07:13:43 25 4
gpt4 key购买 nike

我创建了一个 cloudformation 模板,用于创建一个 SNS::Topic 和一堆其他资源。现在的问题是,当我尝试更新堆栈时,它失败并出现以下错误

"Update to resource type AWS::SNS::Topic is not supported"

堆栈策略是:

{
"Statement" : [
{
"Effect" : "Deny",
"Action" : "Update:*",
"Principal": "*",
"Resource" : "*",
"Condition" : {
"StringEquals" : {
"ResourceType" : ["AWS::SNS::Topic", "AWS::EC2::Subnet"]
}
}
},
{
"Effect" : "Allow",
"Action" : "Update:*",
"Principal": "*",
"Resource" : "*"
}
]
}

CF 模板是

{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "......",
"Resources": {
"MySNSTopic":{
"Type":"AWS::SNS::Topic",
"Properties":{
"DisplayName": "",
"Subscription": [ ],
"TopicName": { "Fn::Join": [ "-", [ "Simple", "sns", "topic" ] ] }
}
}
}

有什么东西(甚至是可破解的)我可以更改,让 aws 完成 aws 更新堆栈而不删除/修改 sns_topic?

最佳答案

我相信错误消息不支持更新资源类型AWS::SNS::Topic不是提示您的权限,而是提示 CloudFormation 模板的限制用于 SNS 主题。

documentation for SNS resource templates声明如下:

Important

After you create an Amazon SNS topic, you cannot update its properties by using AWS CloudFormation. You can modify an Amazon SNS topic by using the AWS Management Console.

相反,您可以尝试添加新主题,切换客户端以使用新主题,然后删除旧主题。如果您很偏执,您可以在单独的更新中进行这些操作。

关于amazon-web-services - 拥有 AWS SNS 时无法更新 cloudformation 堆栈 :Topic Resource,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34330845/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com