我正在使用SSM安全参数存储区来存储RDS数据库的密码。
ssm-secure:
"MasterUserPassword": {
"Fn::Sub": "{{resolve:ssm-secure:${WorkshopName}:1}}"
},
注意“ 1”。 SSM Secure String Parameters docs非常清楚:一个整数,指定要使用的参数的版本。您必须指定确切的版本。当前,您不能指定AWS CloudFormation使用参数的最新版本
那真是令人讨厌
The ciphertext refers to a customer master key that does not exist, does not exist in this region, or you are not allowed to access.
失败)关于如何实现任一方面的更具弹性的逻辑的任何编程建议 *始终获取最新版本,或者 *尝试获取v1时捕获失败,然后递增版本直到成功