我正在尝试使用Erlang ddb模块与amazon的DynamoDB进行交互,并且在尝试设置时遇到了一个奇怪的错误。我调用ddb_iam:credentials()并返回'ok',但ddb_iam:token()函数崩溃并出现错误:(此示例直接来自手册页。
ddb_iam:credentials(AccessKey, SecretKey).
{ok, Key, Secret, Token} = ddb_iam:token(129600).
** exception error: bad argument
in function ets:lookup/2
called as ets:lookup(ibrowse_lb,{"sts.amazonaws.com",443})
in call from ibrowse:send_req/6 (src/ibrowse.erl, line 313)
in call from ddb_aws:retry/4 (src/ddb_aws.erl, line 50)
in call from ddb_iam:token/1 (src/ddb_iam.erl, line 63)
8>
答案 0 :(得分:1)
听起来ibrowse没有启动:
ibrowse:start().