Easy access to the database

I am using Java. Instead of using

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

still store credentials (access key and secret key) in the program; sort of

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

This function does not seem to exist.

+3
source share
1 answer

Have you looked at BasicAWSCredentials?

BasicAWSCredentials credentials = new BasicAWSCredentials(accessKeyId, secretKey);

AmazonSimpleDB mDB = new AmazonSimpleDBClient(credentials);

You can load accessKeyId and secretKey with properties.

+3
source

Source: https://habr.com/ru/post/1790350/


All Articles