エラー表示
有効期限が切れていると下記のようなエラーがでます。
Platform application is disabled
リファレンス
https://docs.aws.amazon.com/sns/latest/api/API_GetPlatformApplicationAttributes.html
https://docs.aws.amazon.com/cli/latest/reference/sns/get-platform-application-attributes.html
aws cli で実行してみる
$ aws sns get-platform-application-attributes --platform-application-arn {確認したいSNSのarn}
$ aws sns get-platform-application-attributes --platform-application-arn arn:aws:sns:ap-northeast-1:0123456789:app/APNS/hogehoge
{
"Attributes": {
"SuccessFeedbackSampleRate": "100",
"EventDeliveryFailure": "arn:aws:sns:ap-northeast-1:0123456789:hogehoge-disabled",
"SuccessFeedbackRoleArn": "arn:aws:iam::0123456789:role/SNSSuccessFeedback",
"Enabled": "false",
"AppleCertificateExpirationDate": "2017-12-01T00:21:01Z",
"FailureFeedbackRoleArn": "arn:aws:iam::0123456789:role/SNSFailureFeedback",
"EventEndpointUpdated": "arn:aws:sns:ap-northeast-1:0123456789:hogehoge-disabled"
}
}
AppleCertificateExpirationDate というキーが有効期限ですね