← 返回命令列表

Linux command

aws 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

List

aws s3 ls

Upload

aws s3 cp [file.txt] s3://[bucket-name]/

List

aws ec2 describe-instances

Get

aws sts get-caller-identity

Invoke

aws lambda invoke --function-name [MyFunction] [output.json]

Example

aws --profile [production] s3 ls

Configure

aws configure

Filter output

aws ec2 describe-instances --query "Reservations[*].Instances[*].[InstanceId,State.Name]" --output table

说明

aws is the unified command-line interface for Amazon Web Services. It provides direct access to AWS services including EC2, S3, Lambda, DynamoDB, and hundreds of others through a consistent interface. The CLI enables automation, scripting, and management of AWS resources from the terminal without using the web console.

参数

--profile _name_
Use specific AWS credentials profile
--region _region_
Override default region
--output _format_
Output format (json, text, table, yaml)
--query _query_
JMESPath query to filter output
--debug
Enable debug logging
--no-cli-pager
Disable output paging
--endpoint-url _url_
Override service endpoint
--no-verify-ssl
Disable SSL verification
--no-paginate
Disable automatic pagination of results
--cli-binary-format _format_
Control binary parameter encoding (raw-in-base64-out or raw-in-raw-out)
--version
Display AWS CLI version

FAQ

What is the aws command used for?

aws is the unified command-line interface for Amazon Web Services. It provides direct access to AWS services including EC2, S3, Lambda, DynamoDB, and hundreds of others through a consistent interface. The CLI enables automation, scripting, and management of AWS resources from the terminal without using the web console.

How do I run a basic aws example?

Run `aws s3 ls` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --profile _name_ do in aws?

Use specific AWS credentials profile