awscli配置Access key ID和Secret access key
配置config和credentials
在~/
下创建.aws/
目录,进入.aws
创建config
和credentials
文件,权限修改为600
。(Windows在用户目录下创建.aws/
)
config
1 | [default] |
regionj是aws区域,根据
credentials
1 | [default] |
aws_access_key_id
和aws_secret_access_key
需要在aws上创建AIM用户来获取。
aws区域列表:
Code | Name |
---|---|
US East (Ohio) | us-east-2 |
US East (N. Virginia) | us-east-1 |
US West (N. California) | us-west-1 |
US West (Oregon) | us-west-2
Asia Pacific (Hong Kong) | ap-east-1
Asia Pacific (Mumbai) | ap-south-1
Asia Pacific (Osaka-Local) | ap-northeast-3
Asia Pacific (Seoul) | ap-northeast-2
Asia Pacific (Singapore) | ap-southeast-1
Asia Pacific (Sydney) | ap-southeast-2
Asia Pacific (Tokyo) | ap-northeast-1
Canada (Central) | ca-central-1
Europe (Frankfurt) | eu-central-1
Europe (Ireland) | eu-west-1
Europe (London) | eu-west-2
Europe (Paris) | eu-west-3
Europe (Stockholm) | eu-north-1
Middle East (Bahrain) | me-south-1
South America (São Paulo) | sa-east-1
aws区域列表:
https://docs.aws.amazon.com/general/latest/gr/rande.html