Amazon SNS-发送短信,交付状态 [英] Amazon SNS - Sending SMS, delivery status

查看:223
本文介绍了Amazon SNS-发送短信,交付状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Amazon SNS发送消息,但它显示出异常行为.它向某些号码发送消息,而可能向其他号码发送消息,也可以不向其他号码发送消息.

I am trying to send messages using Amazon SNS but it's showing atypical behavior. It sends messages to some of the numbers while may or may not to others.

import boto3
client = boto3.client('sns', .....)
client.publish(PhoneNumber, Message)

我正在使用发布API直接为OTP发送SMS,而不使用主题.有什么方法可以获取他们的交货状态吗?区域/DND是否会影响交付.这是印度数字.我正在使用事务性消息.

I am using the publish API to directly send SMS for OTPs without using Topics. Is there a way I can get the delivery status for them? Would region/DND affect the delivery. This is for Indian numbers. I am using Transactional messages for the same.

推荐答案

在控制台上,有文本消息传递首选项".需要设置 IAM角色以访问CloudWatch Logs Report Storage 存储桶.设置完成后,Amazon将开始在CloudWatch中存储日志.完成后,它将开始在控制台UI中显示交付速度和状态,并在CloudWatch中显示详细日志.

On the console there is 'Text Messaging Preferences'. One needs to set up, IAM role for CloudWatch Logs access and Report Storage bucket. Once they are set up, Amazon will start storing logs in CloudWatch. Once done it will start showing delivery rates and status in the console UI and detailed logs in CloudWatch.

有很多原因可能导致交付失败.它列出了所有内容.即使邮件类型为transactional,DND也可能影响传递.

There are multitudes of reason for which delivery may fail. It lists out all on them. DND can also affect the delivery even if message type is transactional.

还有一个可用的API可以相应地查询这些日志.

Also there is a availalble API to query these logs accordingly.

这篇关于Amazon SNS-发送短信,交付状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆