gpt4 book ai didi

amazon-web-services - 未授权AWS Elasticsearch Service执行滚动

转载 作者:行者123 更新时间:2023-12-03 00:14:55 26 4
gpt4 key购买 nike

我正在尝试使用elasticdump从AWS Elasticsearch Service复制索引:

elasticdump --input=https://xxx.xx-xxx-x.es.amazonaws.com/my_index --output=my_index.json

政策的相关部分:
...
"Action": "es:*",
"Resource": [
"arn:aws:es:xx-xxx-x:XXXXXXXX:domain/escluster/*",
"arn:aws:es:xx-xxx-x:XXXXXXXX:domain/escluster",
"arn:aws:es:xx-xxx-x:XXXXXXXX:domain/escluster/_search/scroll"
]
...

经过100个对象,我得到:
{"Message":"User: anonymous is not authorized to perform: es:ESHttpGet on resource: arn:aws:es:xx-xxx-x:XXXXXXXX:domain/escluster/_search/scroll"}

为什么AWS阻止我滚动?

最佳答案

您可能需要为将访问ES的计算机添加IP以进行转储
我有类似的问题,并添加了IP解决了我的问题
我的政策是这样的:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::<AWSACCOUNT>:root"
},
"Action": "es:*",
"Resource": "arn:aws:es:us-west-1:<AWSACCOUNT>:domain/<domain>/*"
},
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "*",
"Resource": [
"arn:aws:es:<AWSACCOUNT>:domain/<domain>/*",
"arn:aws:es:<AWSACCOUNT>:domain/<domain>/_search/scroll"
],
"Condition": {
"IpAddress": {
"aws:SourceIp": [
<IP1>,
<IP2>,
<...>
]
}
}
}
]
}

也许您需要在命令行中设置端口

关于amazon-web-services - 未授权AWS Elasticsearch Service执行滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37097188/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com