如何使用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
专家
已提问 5 个月前16 查看次数
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
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则