我在创建动态引用正确子网的ElastiCache SubnetGroup时遇到了挑战。我想在东部和西部地区使用相同的模板,因此我要在映射中为子网组指定子网。但是,当我尝试运行更新堆栈时,出现以下错误:
Value of property SubnetIds must be of type List of String
以下是要点,大致显示了我要执行的操作:https://gist.github.com/brockhaywood/b71ed34c6a554a0a0fec
AWS论坛上的这个未解决的问题似乎是一个非常相似的问题:https://forums.aws.amazon.com/message.jspa?messageID=532454
最佳答案
我认为 SubnetIds
should be an array,在这里您有一个对象。
"ElastiCacheSubnetGroup": {
"Type": "AWS::ElastiCache::SubnetGroup",
"Properties": {
"SubnetIds": [
{
"Fn::FindInMap":["RegionMap", { "Ref":"AWS::Region" }, AppSubnets" ]
}
]
}
}
关于amazon-web-services - Cloudformation:ElastiCache SubnetGroup中引用创建的子网,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33533539/