Error on run: Property validation failure: [Value of property {/Targets/0/Values} does not match type {Array}]

Question:

This CF is being created in YAML not JSON.

I am building Systems Manager Maintenance Windows, Targets and Tasks through Cloudformation.

When creating the stack, the Resources: MaintenanceWindow: section complete successfully. It’s the next section (below) that is failing. Not sure about the last section as we never get there.

Here is the location for the full template: https://pastebin.com/DNEkLPGS

I have tried using validators and everything (YAML and the CloudFormation Validators) and everything comes back as good.

Here is the section giving errors:

Running the template gives the following error:

MaintenanceWindowTarget | CREATE_FAILED | Property validation failure: [Value of property {/Targets/0/Values} does not match type {Array}]

Answer:

Found the issue, it was a formatting problem:

The issue lied in the Targets section:

The above was incorrect. Below is the correction:

Hope this helps others!!

Leave a Reply