使用s3 api访问AWS S3服务

创建配置文件,执行如下命令:

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

参考资料

相关推荐
sun032216 小时前
【AWS】【服务】aws 中的各种服务 ,比如 ECS、S3 、EC2 、 Certicicate Manager、CloudWatch等
云计算·aws
sun03223 天前
【AWS】【ECS】部署流程
云计算·aws
七夜zippoe4 天前
分布式系统弹性设计实战:Hystrix与Sentinel熔断降级深度解析
java·hystrix·sentinel·aws·分布式系统
vortex54 天前
MinIO 与 mc 客户端完整使用指南
aws·minio·云技术
代码N年归来仍是新手村成员5 天前
OpenClaw本地部署 + AWS Bedrock Claude 4.5 模型
后端·云计算·aws
如果曾经拥有5 天前
AWS使用教程-运行环境创建
云计算·aws
henry1010106 天前
Python脚本 - 创建AWS月度预算
python·云计算·aws
JiL 奥6 天前
AWS之Gitlab增量配置
云计算·gitlab·aws
JiL 奥6 天前
AWS之Gitlab增量架构(c/c++项目)
c语言·gitlab·aws
henry1010107 天前
利用Python一键创建AWS EC2实例
linux·python·云计算·aws·ec2