0

I am trying to enable APNSChannel on Pinpoint using CloudFormation template and I am using key credentials for configuration. I added Authentication key , which is .p8 file, as txt in this format:

-----BEGIN PRIVATE KEY-----
xxxxxxyyyyyyyyyyyyshckdyyyyyy
-----END PRIVATE KEY-----

But I get following error for APN when I run my stack:

Property validation failure: [Value for property {/DefaultAuthenticationMethod} does not match pattern {TOKEN|CERTIFICATE}]

Do you have any idea how can I resole the issue?

Alex
  • 97
  • 8

1 Answers1

0

well I just saw your question, but in case you still need the answer:

First: The AWS documentation is wrong because the values for the DefaultAuthenticationMethod are not key or certificate, the values are exactly what the error show TOKEN or CERTIFICATE.

Second: Copy from the .p8 file the key and remove the lines breakers or spaces and the BEGIN PRIVATE KEY and END PRIVATE KEY lines:

DefaultAuthenticationMethod: 'TOKEN'

TokenKey: 'xxxxxxyyyyyyyyyyyyshckdyyyyyy'