aws

AWS 命令行接口

补充说明

aws 是 AWS CLI 的入口,覆盖 S3、EC2、IAM、CloudWatch 等几乎所有 AWS 服务。它按 aws <service> <operation> 组织命令,支持 profile、区域和 JMESPath 输出过滤。

常用示例

aws configure
aws configure --profile prod
aws sso login --profile prod
aws sts get-caller-identity
aws s3 ls
aws s3 sync ./dist s3://my-bucket/dist --delete
aws s3api list-buckets --query 'Buckets[].Name' --output table
aws ec2 describe-instances \
  --filters "Name=instance-state-name,Values=running" \
  --query 'Reservations[].Instances[].InstanceId' \
  --output text
aws logs tail /aws/lambda/my-fn --follow
aws iam list-users --output table
aws --profile prod --region ap-southeast-1 s3 ls

易错点与排错

相关命令