3

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.

Jonik
  • 80,077
  • 70
  • 264
  • 372
max
  • 31
  • 1

1 Answers1

3

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.

Ryan
  • 392
  • 2
  • 11