failed to satisfy constraint: Member must satisfy regular expression pattern: [\w+=,.@-]+

Viewed 8680

I am trying to apply a policy for an identity pool in AWS. I am using awc-cli to set up the policy but it constantly gives me this exception from the title:

An error occurred (InvalidRequestException) when calling the AttachPrincipalPolicy operation: 1 validation error detected: Value ''DeviceShadowPolicy'' at 'policyName' failed to satisfy constraint: Member must satisfy regular expression pattern: [\w+=,.@-]+

This is the command I use:

aws iot attach-principal-policy --policy-name 'DeviceShadowPolicy' --principal 'PRINCIPAL'

I do not understand why do I get this error. Could somebody help me out?

1 Answers

Apparently, the answer was that it has to be without the single quotation sign. All the examples I saw had it with a quotation sign but for me it worked without.

Hopefully, that helps somebody.

Related