Skip to content

Instantly share code, notes, and snippets.

@knu
Created March 8, 2016 11:28
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save knu/2a01a2cc788e97654cd8 to your computer and use it in GitHub Desktop.
Save knu/2a01a2cc788e97654cd8 to your computer and use it in GitHub Desktop.
Update an APNS certificate on SNS using aws CLI
arn=arn:aws:sns:...
p12=/path/to.p12
aws sns set-platform-application-attributes --platform-application-arn "$arn" --attributes PlatformCredential="\"$(openssl pkcs12 -in "$p12" -nodes -nocerts)\"",PlatformPrincipal="\"$(openssl pkcs12 -in "$p12" -nodes -nokeys)\""
@maxmika
Copy link

maxmika commented Jan 13, 2020

Thank you so much! 💯 Saved my day.

@nationofone
Copy link

Thank you!

@knu
Copy link
Author

knu commented Feb 10, 2020

I'm glad this command still works for you guys!

@alroca01
Copy link

I'm getting the same issue with my push certificate. I believe this is the solution that I'm looking for. I'd like to know how can I run this code. Can I get some help from you guys?

@paulja
Copy link

paulja commented Apr 21, 2021

Thank you this was super useful 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment