如何使用mobiletargeting:SendOTPMessage和mobiletargeting:VerifyOTPMessage。

0

【以下的问题经过翻译处理】 当在Amazon Pinpoint项目的上下文中使用mobiletargeting:SendOTPMessage时,我会收到以下错误。

User: arn:aws:iam::<snip>:user/<snip>未被授权在资源arn:aws:mobiletargeting:<region>:<accountId>:apps/<projectId>/otp上执行mobiletargeting:SendOTPMessage。

添加以下策略无法识别mobiletargeting:SendOTPMessage或mobiletargeting:VerifyOTPMessage,我缺少了什么?

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogStream", "logs:PutLogEvents", "logs:CreateLogGroup" ], "Resource": "arn:aws:logs:::" }, { "Effect": "Allow", "Action": [ "mobiletargeting:SendOTPMessage", "mobiletargeting:VerifyOTPMessage " ], "Resource": "arn:arn:aws:mobiletargeting:<region>:<accountId>:apps/<projectId>/otp/" } ] }

profile picture
EXPERTE
gefragt vor 6 Monaten21 Aufrufe
1 Antwort
0

【以下的回答经过翻译处理】 经过AWS技术支持的帮助,通过以下步骤解决了问题。

  1. 创建如下所示的策略。有两个关键点:
  • 在GUI中忽略与SendOTPMessage和VerifyOTPMessage相关的两个“无效操作”错误。保存策略。
  • 确保资源URL完全按照指定的方式,并使用您的帐户ID。

换句话说,使用此选项代替“第2.1步:创建IAM策略”中的策略示例:https://docs.aws.amazon.com/pinpoint/latest/developerguide/tutorials-two-way-sms-part-2.html

{
        “Version”:“2012-10-17”,
        “语句”:[
                {
                        “Sid”:“UseConsole”,
                        “Effect”:“Allow”,
                        “Action”:[
                                “mobiletargeting:SendOTPMessage”,
                                “mobiletargeting:VerifyOTPMessage”
                        ],
                        “Resource”:“arn:aws:mobiletargeting:*:YOUR_ACCOUNT_ID:apps / *”
                }
        ]
}
  1. 将该策略附加到用户。
profile picture
EXPERTE
beantwortet vor 6 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen