【问题标题】:Create JSON value in SSM Parameter Store in Cloudformation在 Cloudformation 的 SSM 参数存储中创建 JSON 值
【发布时间】:2021-11-25 22:30:15
【问题描述】:

我需要在 Cloudformation 中创建 SSM 参数存储来存储 JSON

这是我的模板

Resources:
  WebServersSSM:
    Type: AWS::SSM::Parameter
    Properties: 
      AllowedPattern: String
      DataType: text
      Description: WebServers CloudWatch Agent Configuration
      Name: WebServersSSM
      Type: String
      Tier: Standard
      Value: |
        {
           ... My JSON File  
        }

我遇到了错误

Parameter value, cannot be validated against allowedPattern: String (Service: AmazonSSM; Status Code: 400; Error Code: ParameterPatternMismatchException; Request ID: a7c2f063-9e63-4b4c-981b-c9ad05e56166; Proxy: null)

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation amazon-cloudwatch aws-ssm


    【解决方案1】:

    AllowedPattern 是用于验证模式而非预期类型的​​正则表达式。删除它,它应该可以工作。

    【讨论】:

    • 成功了,谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-05-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多