配置config和credentials

~/下创建.aws/目录,进入.aws创建configcredentials文件,权限修改为600。(Windows在用户目录下创建.aws/)

config

[default]
output = json
region = cn-northwest-1

regionj是aws区域,根据

credentials

[default]
aws_access_key_id = ABCDEFGHIGKLMN
aws_secret_access_key = 1234567890abcdefg

aws_access_key_idaws_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