Author:
AWS CLI with Certification⚓︎
好的,用 AWS CLI 配置最稳。步骤: 1. 安装 AWS CLI(如果还没装) aws --version 如果提示不存在,再安装(macOS): brew install awscli 1. 配置凭证(会写到 ~/.aws/credentials) aws configure 按提示输入: * AWS Access Key ID * AWS Secret Access Key * Default region name(比如 ap-northeast-1 或你的桶所在区域) * Default output format(留空或填 json) 1. 验证是否可用: aws sts get-caller-identity
create a new iam
- 进入 AWS 控制台:https://console.aws.amazon.com/
- 右上角搜索栏输入 IAM,点进入 IAM 服务
- 左侧菜单点 Users → 选中你的 IAM 用户
- 进入用户详情页 → Security credentials 标签
- 在 “Access keys” 区域点 Create access key
- 选择 “Command Line Interface (CLI)” → Next → Create
-
复制保存 Access Key ID 和 Secret Access Key(只显示一次)
-
Access Key ID / Secret Access Key
- 进入 AWS 控制台 → 右上角用户名 → Security credentials
- 找到 “Access keys” → Create access key
- 创建后会给你一对 Access Key ID 和 Secret Access Key(只显示一次,记得保存)
- Default region
- 你的 S3 桶所在区域就是默认 region
- 在 S3 控制台里点开桶,详情页会显示区域(比如 ap-northeast-1、us-east-1)