简体   繁体   English

如何使用 Lambda 批量加载 AWS Neptune?

[英]How do i Bulk Load AWS Neptune using a Lambda?

I'm trying to attempt bulk loading Neptune using the loader endpoint, and Apache HTTP client by making the POST call like below.我正在尝试通过如下所示的 POST 调用尝试使用加载程序端点和 Apache HTTP 客户端批量加载 Neptune。

My lambda is in the same VPC as Neptune and has the same sub-nets and Security group as well.

However i'm seeing : 

`org.apache.http.NoHttpResponseException: cluster-endpoint-url:8182 failed to respond`

ObjectMapper objectMapper = new ObjectMapper();
String requestBodyJSON = objectMapper
        .writeValueAsString(values);

CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost("http://endpont:8182/loader");
log.info("Initiated HTTP Client ");
HttpEntity stringEntity = new StringEntity(requestBodyJSON, ContentType.APPLICATION_JSON);
httpPost.setEntity(stringEntity);
CloseableHttpResponse response2 = httpclient.execute(httpPost);
log.info("RESPONSE is "+ response2);

The likely issue is the use of http:// versus https:// .可能的问题是使用http://https:// Neptune does not allow for non-SSL/TLS connections. Neptune 不允许非 SSL/TLS 连接。 Also check your security group configuration.还要检查您的安全组配置。 The security group for Neptune should be allowing inbound traffic from the subnets or the security group used by the Lambda function. Neptune 的安全组应该允许来自 Lambda 函数使用的子网或安全组的入站流量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM