当我试图发布到我的终端中的主题时:
import boto3
client = boto3.client('sns', region_name="us-east-2")
response = client.publish(
TopicArn="my_topic_arn",
Message="message",
)我得到了这个user/xxxxx is not authorized to perform: SNS:Publish on resource:
如何将其更改为使用user/yyyyy
发布于 2019-04-08 10:49:40
user/xxxxx是使用默认配置文件配置的AWS凭据。如果要使用user/yyyyy凭据,则需要使用aws configure更新AWS凭据,或者在环境变量AWS_ACCESS_KEY_ID和AWS_SECRET_ACCESS_KEY中设置它们。
https://stackoverflow.com/questions/55571239
复制相似问题