Simple DB accessing

274 views Asked by At

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.

1

There are 1 answers

0
Ryan On

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.