我正在按照此处的说明在本地运行 DynamoDB 。为了消除潜在的 docker 网络问题,我使用“本地下载”版本的说明。在本地运行 dynamo 之前,我运行aws configure为 AWS 访问、秘密和区域设置一些假值,以下是输出:
$ aws configure
AWS Access Key ID [****************fake]:
AWS Secret Access Key [****************ake2]:
Default region name [local]:
Default output format [json]:
Run Code Online (Sandbox Code Playgroud)
这是本地运行 dynamo 的输出:
$ java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
Initializing DynamoDB Local with the following configuration:
Port: 8000
InMemory: false
DbPath: null
SharedDb: true
shouldDelayTransientStatuses: false
CorsParams: *
Run Code Online (Sandbox Code Playgroud)
我可以通过使用 aws cli 列出表来确认 DynamoDB 在本地成功运行
$ aws dynamodb list-tables --endpoint-url http://localhost:8000
{
"TableNames": []
}
Run Code Online (Sandbox Code Playgroud)
但是当我在浏览器中访问 http://localhost:8000/shell …