java-简单的数据库访问
作者:互联网
我正在使用Java.
而不是使用
AmazonSimpleDB sdb = new AmazonSimpleDBClient(new PropertiesCredentials(
new File("/AwsCredentials.properties")));
无论如何,在程序中是否存储凭证信息(访问密钥和秘密密钥);就像是
AmazonSimpleDB sdb = new AmazonSimpleDBClient("acesskey","secretkey");
似乎此功能不存在.
解决方法:
您是否看过BasicAWSCredentials?
BasicAWSCredentials credentials = new BasicAWSCredentials(accessKeyId, secretKey);
AmazonSimpleDB mDB = new AmazonSimpleDBClient(credentials);
您可以通过使用Properties加载accessKeyId和secretKey.
标签:amazon-web-services,amazon-simpledb,java 来源: https://codeday.me/bug/20191208/2093747.html