如何使用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
專家
已提問 6 個月前檢視次數 21 次
1 個回答
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
專家
已回答 6 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南