我有一段 cloudFormation 代码
"dareMeXDevCloudwatchMissingPayoutsJob": {
"Type": "AWS::Events::Rule",
"DependsOn": [
"xxx"
],
"Properties": {
"Description": "xxxxx)",
"RoleArn": {
"Fn::GetAtt": [
"xxxxx",
"Arn"
]
},
"Name": "xxxxx",
"ScheduleExpression": "cron(0 8 ? * 6 *)",
"State": "ENABLED",
"Targets": [
{
"Arn": {
"Fn::GetAtt": [
"xxxxxxx",
"Arn"
]
},
"Id": "xxxx",
"Input": "{\"val1\":\"val1\",\"secretVal\":\"??????????????????\"}"
}
]
}
}
我想要完成的事情是将 Secrets Manager 值传递给变量secretVal
我试图通过将 secretVal 值设置为来做到这一点{{resolve:secretsmanager:{arn of secret}:SecretString}}
,但是在 cloudWatch 事件上我有 optput{"val1": "val1", "secretVal": "{{resolve:secretsmanager:{arn of secret}:SecretString}}"}
例如,当我尝试将 Name 设置为 时{{resolve:secretsmanager:{arn of secret}:SecretString}}
,一切正常,但使用 Input 时它不起作用。我做错了吗?或者也许还有其他方法可以将秘密值传递给 cloudWatch 事件主体?预先感谢!