[英]Message“:”User: anonymous is not authorized to perform: iam:PassRole
I am following below link for "Use Amazon S3 to Store a Single Amazon Elasticsearch Service Index" 我正在关注“使用Amazon S3存储单个Amazon Elasticsearch服务索引”的以下链接
https://aws.amazon.com/blogs/database/use-amazon-s3-to-store-a-single-amazon-elasticsearch-service-index/ https://aws.amazon.com/blogs/database/use-amazon-s3-to-store-a-single-amazon-elasticsearch-service-index/
When I am trying 当我在尝试
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"
}
}'
with update bucket, region and role_arn, but I am getting below error 有更新桶,区域和role_arn,但我收到以下错误
{"Message":"User: anonymous is not authorized to perform: iam:PassRole on resource: arn:aws:iam...}
To resolve this issue, I followed this link https://aws.amazon.com/premiumsupport/knowledge-center/anonymous-not-authorized-elasticsearch/ also. 为了解决这个问题,我也点了这个链接https://aws.amazon.com/premiumsupport/knowledge-center/anonymous-not-authorized-elasticsearch/ 。 but still It is not working. 但仍然无法正常工作。
You need to sign your requests to AWS Elasticsearch. 您需要将您的请求签名到AWS Elasticsearch。 The blog post that you linked describes using a proxy server to create the signature, did you do that? 您链接的博客文章描述了使用代理服务器创建签名,您是否这样做了?
As an alternative to using such a proxy server with curl, you can make the requests from a program. 作为使用curl的这种代理服务器的替代方法,您可以从程序中发出请求。 In the AWS Elasticsearch docs give you an example in Python, with a link to a Java client. 在AWS Elasticsearch文档中,您将在Python中为您提供一个示例,其中包含指向Java客户端的链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.