【问题标题】:Message":"User: anonymous is not authorized to perform: iam:PassRoleMessage":"用户:anonymous 无权执行:iam:PassRole
【发布时间】:2019-01-22 07:11:25
【问题描述】:

我正在关注“使用 Amazon S3 存储单个 Amazon Elasticsearch 服务索引”的以下链接
https://aws.amazon.com/blogs/database/use-amazon-s3-to-store-a-single-amazon-elasticsearch-service-index/

当我尝试时

curl -XPUT 'http://localhost:9200/_snapshot/snapshot-repository' -d'{
    "type": "s3",
    "settings": {
        "bucket": "es-s3-repository",
        "region": "us-west-2",
        "role_arn": "arn:aws:iam::123456789012:role/es-s3-repository"
    }
}'

使用更新存储桶、区域和角色_arn,但我遇到了错误

{"Message":"User: anonymous is not authorized to perform: iam:PassRole on resource: arn:aws:iam...}

为了解决这个问题,我也关注了这个链接https://aws.amazon.com/premiumsupport/knowledge-center/anonymous-not-authorized-elasticsearch/。但还是不行。

【问题讨论】:

    标签: amazon-web-services elasticsearch amazon-s3


    【解决方案1】:

    您需要签署对 AWS Elasticsearch 的请求。您链接的博客文章描述了使用代理服务器创建签名,您这样做了吗?

    作为在 curl 中使用此类代理服务器的替代方法,您可以从程序发出请求。在AWS Elasticsearch docs 中给你一个Python 的例子,带有一个Java 客户端的链接。

    【讨论】:

    • 这个答案被标记为已接受,所以我想它解决了提问者的问题....我的问题:看起来不错,但如果我使用 boto 3(正如他们在docs),如何在 S3 中创建快照(类似于调用“/_snapshot/”)?
    猜你喜欢
    • 2021-10-14
    • 2019-01-25
    • 2021-11-28
    • 2021-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-16
    • 2018-11-07
    相关资源
    最近更新 更多