AWS DynamoDB DAX Node.js示例 [英] AWS DynamoDB DAX Node.js Example

查看:85
本文介绍了AWS DynamoDB DAX Node.js示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人在node.js中使用AWS DynamoDB DAX有很好的例子吗?那需要考虑什么呢?(例如VPC,子网,安全组等).

Does anyone have a good example using AWS DynamoDB DAX in node.js? And what needs to be considered? (E.g. VPC, Subnet, Security Group, etc.).

我得到

错误:NoRouteException:没有可用的终结点

Error: NoRouteException: No endpoints available

部分

错误:ValidationException:必需的键之一未提供值

Error: ValidationException: One of the required keys was not given a value

不获取数据,既不存储在缓存中,也不存储在数据库中.

Don't get data stored, not in the cache, nor on the DB.

谢谢!

推荐答案

There is the TryDax example in the documentation, which describes how to access data using both DynamoDB and DAX - the DAX client should be a drop in replacement. The second error is most likely just a missing part of the key.

要设置VPC和子网要复杂得多-客户端计算机和群集必须位于同一VPC(或对等VPC)中,并且两者都必须位于允许从客户端到群集的流量的安全组中.您还需要 IAM政策和角色配置正确,以便DAX可以对客户端进行身份验证.

Getting VPCs and subnets set up is a bit more involved - the client machine and the cluster must be in the same VPC (or peered VPCs) and both must be in a security group that allows traffic from the client to the cluster. You also need IAM policies and roles configured correctly so that DAX can authenticate the client.

这篇关于AWS DynamoDB DAX Node.js示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆