0

I am using the following command. Getting Authorization error.

aws sns publish --phone-number +91XXXXXXXXXX --message hello

An error occurred (AuthorizationError) when calling the Publish operation: User: arn:aws:XXX::XXXXXXXXXXXX:user/ABC-DEF-SNS is not authorized to perform: SNS:Publish on resource: +91XXXXXXXXXX

Other related sns commands are working. I can also able to send sms through a topic to a subscribed number.

closed as off-topic by Tensibai Jan 3 '18 at 13:52

  • This question does not appear to be about DevOps, within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I'm voting to close this question as off-topic because this is a question for AWS support and it's in no way related to devops. – Tensibai Jan 3 '18 at 13:52
0

Most probably your user arn:aws:XXX::XXXXXXXXXXXX:user/ABC-DEF-SNS does not have the required permissions to the sns:Publish API.

You can check using the IAM Policy Simulator at https://policysim.aws.amazon.com/

using policy simulator is explained in depth here https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html

Not the answer you're looking for? Browse other questions tagged or ask your own question.