나는 람다 함수에 의해 지원되는 커스텀 리소스를 사용하는 cloudformation 템플릿을 가지고있다. 람다 함수의 매개 변수 중 하나는 문자열 목록입니다. 목록에 하나의 항목 만 전달하고 Fn : Join을 사용하여 문자열을 연결합니다. 그러나 Fn :: Join을 사용하면 잘못된 json이 발생하므로 오류가 발생합니다. 모든 입력을 부탁드립니다.aws cloudformation 사용 목록에서 Fn :: 가입
"구독": [ "FN이 :: 가입": [ "", [ "A", "B", "C"를]]]
A client error (ValidationError) occurred when calling the CreateStack operation : Template format error: JSON not well-formed.
Cloudformation는 니펫을 : -
"Resources": {
"MyCustomRes": {
"Type": "Custom::CustomResource",
"Properties": {
"ServiceToken": { "Fn::Join": [ "", [
"arn:aws:lambda:",
{ "Ref": "AWS::Region" },
":",
{ "Ref": "AWS::AccountId" },
":function:LambdaFn"
] ] },
"Version": 1,
"ResourceName": { "Ref": "ResourceName" },
"Subscriptions" : [ "Fn::Join": [ "", [
"arn:aws:sns:",
{ "Ref": "AWS::Region" },
":",
{ "Ref": "AWS::AccountId" },
":Topic1"
] ] ]
}
} },