使用CF模板创建AWS :: Pinpoint :: PushTemplate

时间:2020-07-17 12:36:25

标签: aws-lambda amazon-cloudformation aws-pinpoint

嗨,我想使用cloudformation模板创建AWS :: Pinpoint :: PushTemplate,我正在关注以下链接:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html

Type: AWS::Pinpoint::PushTemplate
Properties:
  Default:
    Action: OPEN_APP
    Body: FirstName - {{firstName}}, LastName - {{lastName}}
    Title: Title
  DefaultSubstitutions:
    firstName: default
    lastName: default
  Tags:
    project: project
    tashi: "Pinpoint Template"
  TemplateName: template_name

我收到有关DefaultSubstitutions的类型验证错误:Property validation failure: [Value of property {/DefaultSubstitutions} does not match type {String}]

1 个答案:

答案 0 :(得分:1)

根据文档DefaultSubstitutionsString

但是,在您的情况下,您将其设置为地图:

  DefaultSubstitutions:
    firstName: default
    lastName: default

也许不得不尝试将其用作json字符串:

DefaultSubstitutions: "{\"firstName"\:\"default\", \"lastName"\:\"default\"}"