Setting AWS Credentials: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= =Procedure= Provision the API access keys for the Amazon IAM user that will use the API. More details about access keys here: Amazon AWS Security Concepts#API_A...")
 
No edit summary
Line 1: Line 1:
=External=
* https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html#credentials-file-format
=Internal=
=Internal=


Line 22: Line 25:
  aws_access_key_id=...
  aws_access_key_id=...
  aws_secret_access_key=...
  aws_secret_access_key=...
For more methods of configuring credentials see:
{{External|https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html#credentials-file-format}}

Revision as of 20:02, 24 October 2018

External

Internal

Procedure

Provision the API access keys for the Amazon IAM user that will use the API. More details about access keys here: Amazon AWS API Access Keys.

Access keys can be specified on command line every time an ec2 command is issued, with:

-aws-access-key or -O
--aws-secret-key or -W 

or by setting the following environment variables:

export AWS_ACCESS_KEY=your-aws-access-key-id 
export AWS_SECRET_KEY=your-aws-secret-key

In case the Java process that is performing the call does not have access to the environment, the credentials may be specified in .aws/credentials:

[default]
aws_access_key_id=...
aws_secret_access_key=...