Reputation: 1788
I understand how to create an AWS profile (with some access keys) on a machine locally through the command line. I 'm just wondering if there is a way to do it through the JAVA SDK.
Upvotes: 1
Views: 1582
Reputation: 269826
The aws configure
command is simply storing information in the .aws/credentials
and.aws/config
files. You can programmatically create those files if you wish — they are just text file. There are no API calls involved.
For the contents and format of the file, see: Configuration and Credential Files - AWS Command Line Interface
~/.aws/credentials
[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
~/.aws/config
[default]
region=us-west-2
output=json
Upvotes: 1