Giriş
Yaratılan "Access Key" değerlerini içeri alır. Bu komutun sonucunda
1. ~/.aws/credentials ve
2. ~/.aws/config
isimli iki dosya oluşur
~/.aws/credentials Dosyası - Hassas Bilgileri İçerir
Örnek
[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
~/.aws/credentials Dosyası - Profile ayarlarını içerir
[default] profile için komut seçeneğinde "--profile ..." parametresini belirmeye gerek yoktur
Örnek
[default]
region=us-west-2
output=json
Kullanım
Örnek
$ aws configure
(Replace your access key when prompted)
AWS Access Key ID [None]: ABCDEFGHIAZBERTUCNGG
(Replace your secret key when prompted)
AWS Secret Access Key [None]: uMe7fumK1IdDB094q2sGFhM5Bqt3HQRw3IHZzBDTm
(you can put your own availability zone here )
Default region name [None]: ap-south-1
Default output format [None]: json
Örnek
# to setup aws configuration for terraform
aws configure
AWS Access Key ID [None]: <PASTE>
AWS Secret Access Key [None]: <PASTE>
# to see, where are your credentials saved.
cat $HOME/.aws/credentials
configure sso seçeneği
Komutun detayları
burada. Single sign on içindir.
Örnek - Profile İle Kullanım
Şöyle yaparız
> aws configure sso
SSO start URL [None]: https://foo.awsapps.com/start
SSO Region [None]: us-east-1
Attempting to automatically open the SSO authorization page in your default browser.
If the browser does not open or you wish to use a different device to authorize this
request, open the following URL:
https://device.sso.us-east-1.amazonaws.com/
Then enter the code:
ABC-DEFG
The only AWS account available to you is: 123456789012
Using the account ID 123456789012
The only role available to you is: PowerUserAccess
Using the role name "PowerUserAccess"
CLI default client Region [None]: us-east-1
CLI default output format [None]: json
CLI profile name [PowerUserAccess-123456789012]: poweruser
To use this profile, specify the profile name using --profile, as shown:
aws s3 ls --profile poweruser
Şifrenin tarihi geçince şöyle yaparız
Tüm çıktı şöyle
> aws s3 ls --profile poweruser
The SSO session associated with this profile has expired or is otherwise invalid.
To refresh this SSO session run aws sso login with the corresponding profile.
> aws sso login --profile poweruser
Attempting to automatically open the SSO authorization page in your default browser.
If the browser does not open or you wish to use a different device to authorize this
request, open the following URL:
https://device.sso.us-east-1.amazonaws.com/
Then enter the code:
ABCD-EFGH
Successfully logged into Start URL: https://fooo.awsapps.com/start
> aws s3 ls --profile poweruser
...