Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 680
max Avatar asked Feb 12 '26 20:02

max


1 Answers

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.

like image 112
Ryan Avatar answered Feb 14 '26 08:02

Ryan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!