-1

I need to create SSM parameter store in Cloudformation to store JSON

Here is my Template

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  
        }

I am facing error

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)
Ayman Hatem
  • 35
  • 1
  • 5

2 Answers2

0

The AllowedPattern is a regular expression to validate the pattern and not the expected type. Remove it and it should work.

kgiannakakis
  • 103,016
  • 27
  • 158
  • 194
0

Yes AllowedPattern must be remove of you want to store json in Value parameter

MKAY
  • 1
  • 1