Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

createPlatformApplication throwing Server error 500 with sample code AWS SNS PUSH

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.

like image 737
user3915414 Avatar asked Aug 06 '14 17:08

user3915414


1 Answers

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
like image 128
Vincent Chavelle Avatar answered Oct 31 '22 19:10

Vincent Chavelle