AWS CLI Commands
Discover a comprehensive list of AWS Command Line Interface (CLI) commands to help you seamlessly interact with Amazon Web Services. Whether you're managing resources, configuring settings, or troubleshooting issues, these commands are essential for automating and streamlining your workflow.
Examples
actively updated
aws-cli command | description |
---|---|
aws configure --profile <NAME_OF_PROFILE> |
This command will create a new AWS configuration file (usually located at ~/.aws/config ) with the specified profile name. |
aws configure list-profiles |
This command will display a list of existing AWS profiles on your system. |
aws sts get-caller-identity |
This command is used to retrieve the identity information of the caller, including the user or role that is making the request. |
aws sts assume-role --role-arn <ROLE_ARN> --role-session-name AWS-CLI-Session |
This command is used to temporarily assume the role specified by the RoleArn parameter. |
aws s3 ls |
This command is used to list the objects in an Amazon S3 bucket. |
aws s3 cp <FILE> s3://<BUCKET>/<PATH>/ |
This command is used to copy files between a local machine and an Amazon S3 bucket. |
aws s3 cp <FILE> s3://<BUCKET>/<PATH>/ --sse AES256 |
This command is used to copy files between a local machine and an Amazon S3 bucket with encryption AES256 |
aws s3api list-objects --bucket <BUCKET> --prefix <path>/ |
This command will display detailed object information |
aws s3api list-objects-v2 --bucket <BUCKET> --profile <PROFILE_NAME> --query 'length(Contents)' |
This command is used to count of objects |
aws lambda list-functions --query "Functions[?Role=='lambda_role_arn'].FunctionName" |
Show Lambda names based on Lambda Role ARN |