7
votes

I am trying to follow steps mentioned at http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html site to develop a sample push service for aws sns. I keep getting the below mentioned error

===========================================

Getting Started with Amazon SNS

Caught an AmazonServiceException, which means your request made it to Amazon SNS, but was rejected with an error response for some reason. Error Message: Request could not be completed (Service: AmazonSNS; Status Code: 500; Error Code: InternalError; Request ID: a630491b-19c2-58cf-8081-05477accfdda) HTTP Status Code: 500 AWS Error Code: InternalError Error Type: Service Request ID: a630491b-19c2-58cf-8081-05477accfdda

Can someone please help me with this? I know all the credentials are correct because when I try to use a name of my existing application, it tells me that an app with the same name already exists.

1
Having the same problem—did you ever resolve this?PaulJ
Having the same problem. Have you found a solution?Sam
Having the same problem. I even posted it but no reply has anyone solved it?.Ejaz Ahmed
The answer below by Vincent Cavell works! (stackoverflow.com/a/37134886/1433774)Ríomhaire

1 Answers

3
votes

I was able to fix it. I realised that the .pem file provided by Apple contained multiple certificates, so I extracted the correct certificate and everything is working great now.

Instead of obtaining the App Private Key like that:

openssl pkcs12 -in myapnsappprivatekey.p12 -out myapnsappprivatekey.pem -nodes -clcerts

http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html#private-key-apns

Use:

openssl pkcs12 -in myapnsappprivatekey.p12 -out myapnsappprivatekey.pem -nodes -nocerts