翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
Amazon でのSMSメッセージング設定の設定 SNS
Amazon SNSを使用してSMSメッセージングの設定を指定します。例えば、コストや信頼性のために配信を最適化するかどうか、月別使用制限、配信のログ記録方法、日次SMS使用状況レポートをサブスクライブするかどうかを指定できます。
これらの設定は、アカウントから送信するすべてのSMSメッセージに対して有効になりますが、個々のメッセージを送信するときに一部の設定を上書きできます。詳細については、「Amazon を使用して携帯電話にSMSメッセージを発行する SNS」を参照してください。
を使用したSMSメッセージング設定の設定 AWS Management Console
Amazon SNSコンソール
にサインインします。 -
SMS メッセージング をサポートするリージョンを選択します。
-
ナビゲーションパネルで、モバイル、テキストメッセージ (SMS) を選択します。
-
モバイルテキストメッセージング (SMS) ページの「テキストメッセージの設定」セクションで、「編集」を選択します。
-
[テキストメッセージングの優先設定の編集] ページの [詳細] セクションで、以下の操作を実行します。
-
[デフォルトメッセージタイプ] で、次のいずれかを選択します。
-
[プロモーション] — 重要度が低いメッセージ (広告など)。Amazon は、メッセージ配信SNSを最適化して、コストを最小限に抑えます。
-
[トランザクション] - 多要素認証のワンタイムパスコードなど、お客様のトランザクションをサポートするクリティカルメッセージ。Amazon はメッセージ配信SNSを最適化して、最高の信頼性を実現します。
プロモーションメッセージとトランザクションメッセージの料金情報については、「グローバルSMS料金
」を参照してください。 -
-
(オプション) アカウントの使用制限 に、毎月SMSのメッセージに費やす金額 ( でUSD) を入力します。
重要
-
デフォルトでは、支出クォータは 1.00 に設定されていますUSD。サービス限度を引き上げるには、リクエストを送信
します。 -
コンソールで設定された量がサービスクォータを超えると、Amazon はSMSメッセージの発行をSNS停止します。
-
Amazon SNSは分散システムであるため、支出クォータを超過してから数分以内にSMSメッセージの送信を停止します。この間隔でSMSメッセージを引き続き送信すると、クォータを超えるコストが発生する可能性があります。
-
-
-
(オプション) [デフォルトの送信者 ID] にカスタム ID (ビジネスブランドなど) を入力します。これは、受信デバイスに送信者として表示されます。
注記
送信者のサポートIDsは国によって異なります。
-
(オプション) 使用状況レポート用の Amazon S3 バケット名の名前を入力します。
注記
S3 バケットポリシーは、Amazon への書き込みアクセスを許可する必要がありますSNS。
-
[Save changes] (変更の保存) をクリックします。
を使用した設定 AWS SDKs
のいずれかを使用してSMS設定を行うには AWS SDKs、Amazon の SetSMSAttributes
リクエストSDKに対応する SNS アクションを使用しますAPI。このリクエストでは、毎月の支出クォータやデフォルトのSMSタイプ (プロモーションまたはトランザクション) など、さまざまなSMS属性に値を割り当てます。すべてのSMS属性については、「Amazon Simple Notification Service APIリファレンス」の「SetSMSAttributes」を参照してください。
以下のコード例は、SetSMSAttributes
の使用方法を示しています。
国固有の配信のSMSメッセージング設定
特定の送信先国にのみメッセージを送信することで、SMSトラフィックを管理および制御できます。これにより、メッセージは承認された国にのみ送信され、不要なSMS請求は回避されます。次の手順では、Amazon Pinpoint の Protect 設定を使用して、許可またはブロックする国を指定します。
で AWS SMS コンソールを開きますhttps://console.aws.amazon.com/sms-voice/
。 -
ナビゲーションペインの概要 のクイックスタートセクションで、保護設定の作成 を選択します。
-
「Protect 設定の詳細」に、保護設定のビジネスフレンドリ名を入力します (Allow-Only-AU など)。
-
SMS 国ルール で、リージョン/国チェックボックスをオンにして、サポートされているすべての国へのメッセージの送信をブロックします。
-
メッセージを送信する国のチェックボックスをオフにします。例えば、オーストラリアへのメッセージのみを許可するには、オーストラリア のチェックボックスをオフにします。
-
「設定の関連付けの保護」セクションの「関連付けタイプ」で、「アカウントのデフォルト」を選択します。これにより、 AWS End User Messaging SMS Protect 設定が Amazon 、Amazon Amazon Cognito SNS、および Amazon Pinpoint
SendMessages
API呼び出しを介して送信されるすべてのメッセージに影響を与えるようになります。 -
保護設定の作成を選択して設定を保存します。
次の確認メッセージが表示されます。
Success Protect configuration protect-abc0123456789 has been created.
Amazon SNSコンソール
にサインインします。 -
India など、ブロックされている国の 1 つにメッセージを発行します。
メッセージは配信されません。これは、 を使用して配信失敗ログで確認できますCloudWatch。ロググループ sns/region/AccountID /DirectPublishToPhoneNumber/Failure で、次の例のようなレスポンスを検索します。
{ "notification": { "messageId": "bd59a509-XXXX-XXXX-82f8-fbdb8cb68217", "timestamp": "YYYY-MM-DD XX:XX:XX.XXXX“ }, "delivery": { "destination": "+91XXXXXXXXXX", "smsType": "Transactional", "providerResponse": "Cannot deliver message to the specified destination country", "dwellTimeMs": 85 }, "status": "FAILURE" }