max
max

Reputation: 31

Simple DB accessing

I'm using Java. Instead of using

AmazonSimpleDB sdb = new AmazonSimpleDBClient(new PropertiesCredentials( 
                        new File("/AwsCredentials.properties")));

is there anyway to store the credential information (the accesskey and secretkey) in the program; something like

AmazonSimpleDB sdb = new AmazonSimpleDBClient("acesskey","secretkey");

It seems like this function does not exist.

Upvotes: 3

Views: 274

Answers (1)

Ryan
Ryan

Reputation: 392

Have you looked at BasicAWSCredentials?

BasicAWSCredentials credentials = new BasicAWSCredentials(accessKeyId, secretKey);

AmazonSimpleDB mDB = new AmazonSimpleDBClient(credentials);

You can load accessKeyId and secretKey through the use of Properties.

Upvotes: 3

Related Questions