Skip to content

Instantly share code, notes, and snippets.

@rborn
Forked from knu/sns_update_apns_cert.sh
Created September 22, 2017 13:20
Show Gist options
  • Save rborn/4f1ed78aaea7f86e38d76eb345c66c41 to your computer and use it in GitHub Desktop.
Save rborn/4f1ed78aaea7f86e38d76eb345c66c41 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)\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment