我在构建 aws cdk rds 时遇到错误 **堆栈失败:验证错误:给定的输入与预期格式不匹配

问题描述 投票:0回答:2

我在使用打字稿语言构建 rds 实例时遇到错误: 错误 : 类型参数 '{ engine: DatabaseInstanceEngine;专有网络:专有网络; vpcPlacement: { 子网类型: SubnetType.ISOLATED; };存储加密:true;多 Az:假;自动次要版本升级:假; ... 8 个以上 ...;端口:号码; }' 不可分配给“DatabaseInstanceProps”类型的参数。对象文字只能指定已知属性,并且“DatabaseInstanceProps”类型中不存在“instanceClass”。

enter image description here

enter image description here

enter image description here

enter image description here

typescript amazon-web-services amazon-rds aws-cdk
2个回答
2
投票

您似乎使用了错误输入的属性。尝试将数据库实例属性中的属性

instanceClass
替换为
instanceType

这里有文档供您参考。


0
投票

错误消息

Given input did not match expected format
表示 AWS 中的现有堆栈与您尝试部署的版本不匹配。如果您在控制台中转到 CloudFormation 中的堆栈,您可以找出堆栈的哪一部分发生了漂移。漂移实际上是预期堆栈与 CloudFormation 中定义的实际堆栈之间的差异。

修复漂移后,部署应该会很顺利。

© www.soinside.com 2019 - 2024. All rights reserved.