Java 弹性搜索Rest高级客户端返回403错误
我在CNAME后面有一个弹性搜索服务,当我尝试使用curl命令通过命令行访问它时,我能够使用HTTP200OK响应获得正确的响应 然而,当我尝试使用JavaAPI的Rest高级客户端连接到服务时,我得到一个403错误 我的弹性搜索的访问策略配置为*作为AWS主体 错误日志如下所示:Java 弹性搜索Rest高级客户端返回403错误,java,rest,elasticsearch,curl,resthighlevelclient,Java,Rest,elasticsearch,Curl,Resthighlevelclient,我在CNAME后面有一个弹性搜索服务,当我尝试使用curl命令通过命令行访问它时,我能够使用HTTP200OK响应获得正确的响应 然而,当我尝试使用JavaAPI的Rest高级客户端连接到服务时,我得到一个403错误 我的弹性搜索的访问策略配置为*作为AWS主体 错误日志如下所示: [DEBUG] org.elasticsearch.client.RestClient: request [POST http://ES_ENDPOINT/INDEX_NAME/_search?typed_keys
[DEBUG] org.elasticsearch.client.RestClient: request [POST http://ES_ENDPOINT/INDEX_NAME/_search?typed_keys=true&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&search_type=query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true] returned [HTTP/1.1 403 Forbidden]
{"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."}
这背后可能的原因是什么?
此问题仅在CNAME中出现,而不是实际的弹性搜索域名