AWS Command Line Interface
AWS Command Line Interface
Categories
Docker Image
환경변수
- AWS_ACCESS_KEY_ID
- Your Access key ID
- AWS_SECRET_ACCESS_KEY
- Your Secret access key
- AWS_DEFAULT_REGION
- Your region code
기본 설정
Example:
$ aws configure
AWS Access Key ID [None]: AKIAVB2U2RLDBY36QU2G
AWS Secret Access Key [None]: 6KlgHQm8CwSHnFpwNyYZkETU0AIU0Md2HXmMz3NK
Default region name [None]: ap-northeast-2
Default output format [None]: json
이렇게 하면 ~/.aws
디렉토리에 config
파일과 credentials
파일이 저장된다. 해당 내용은 다음과 같다.
$ cat ~/.aws/config
[default]
region = ap-northeast-2
output = json
$ cat ~/.aws/credentials
[default]
aws_access_key_id = AKIAVB2U2RLDBY36QU2G
aws_secret_access_key = 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
설정 확인
$ aws configure list
Name Value Type Location
---- ----- ---- --------
profile <not set> None None
access_key ****************QK2G env
secret_key ****************z3NK env
region ap-northeast-2 env ['AWS_REGION', 'AWS_DEFAULT_REGION']