By default, the SDK detects AWS credentials set in your environment and uses them to sign requests to AWS. That way you don’t need to manage credentials in your applications.
Unix:
$ export AWS_ACCESS_KEY_ID="your_key_id"
$ export AWS_SECRET_ACCESS_KEY="your_secret_key"
Windows:
> set AWS_ACCESS_KEY_ID="your_key_id"
> set AWS_SECRET_ACCESS_KEY="your_secret_key"
you can also add $ export AWS_SESSION_TOKEN='your_token'
(optional)
See aws-sdk for more details.
or create a ~/.aws/credentials
file and add:
[default]
aws_access_key_id = <YOUR_ACCESS_KEY_ID>
aws_secret_access_key = <YOUR_SECRET_ACCESS_KEY>
See aws for more details.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…