创建配置文件,执行如下命令:
shell
mkdir -p ~/.aws
touch ~/.aws/credentials
touch ~/.aws/config
编辑 ~/.aws/credentials,样例如下:
[default]
aws_access_key_id = YOUR_KEY
aws_secret_access_key = YOUR_SECRET
编辑 ~/.aws/config,样例如下:
[default]
region=us-east-1
执行命令,验证配置是否正确,样例如下:
shell
aws s3api put-object \
--bucket text-content \
--key dir-1/big-video-file.mp4 \
--body ~/f-sharp-3-data-services.mp4
参考资料