Editing AWS CLI
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | AWS CLI is available in | + | == AWS Command Line Tool (CLI) == |
− | + | AWS CLI is available in GitHub: https://github.com/aws/aws-cli/releases. | |
− | |||
− | == | + | === Installation === |
+ | * Linux, execute <code>apt-get -y install awscli</code> and configure it<ref>https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html</ref> use <code>aws configure</code> and check configuration using <code>aws configure list</code>. | ||
− | == AWS CLI configuration == | + | * [[MacOS]], execute: <code>brew install awscli</code> |
+ | |||
+ | === AWS CLI configuration === | ||
First you will need to configure your AWS CLI access: <code>[[aws configure]]</code> or <code>[[aws configure --profile]] your-new-profile-name</code>. | First you will need to configure your AWS CLI access: <code>[[aws configure]]</code> or <code>[[aws configure --profile]] your-new-profile-name</code>. | ||
You will be prompted to enter a username and password. | You will be prompted to enter a username and password. | ||
Line 12: | Line 14: | ||
− | Execute <code> | + | Execute <code>aws configure list</code> to view your actual configuration. If you execute for the first time will be something like: |
[[aws configure list]] | [[aws configure list]] | ||
Line 22: | Line 24: | ||
region <not set> None None | region <not set> None None | ||
− | + | === Basic AWS EC2 commands <ref>https://docs.aws.amazon.com/cli/latest/reference/ec2/index.html</ref> === | |
− | |||
− | |||
− | = | ||
− | |||
− | |||
− | |||
− | |||
− | == Basic | ||
Before starting to use AWS CLI you will need to configure IAM policies for your user. | Before starting to use AWS CLI you will need to configure IAM policies for your user. | ||
Line 65: | Line 59: | ||
* <code>aws s3 ls your_bucket_name</code> | * <code>aws s3 ls your_bucket_name</code> | ||
− | * <code> | + | * <code>aws --profile your_profile_name s3 ls your_bucket_name</code> (You can also use a profile to define your credentials) |
* <code>[[aws s3 cp]]</code><ref>https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html</ref> | * <code>[[aws s3 cp]]</code><ref>https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html</ref> | ||
* Size of a ''Bucket'': <code>aws s3 ls --summarize --human-readable --recursive s3://bucket-name/</code> <ref>https://serverfault.com/a/721197</ref> | * Size of a ''Bucket'': <code>aws s3 ls --summarize --human-readable --recursive s3://bucket-name/</code> <ref>https://serverfault.com/a/721197</ref> | ||
Line 72: | Line 66: | ||
* <code>aws iam list-users</code> | * <code>aws iam list-users</code> | ||
:If you do not have permisssions you will get the following error: | :If you do not have permisssions you will get the following error: | ||
− | :: | + | ::An error occurred (AccessDenied) when calling the ListUsers operation: User: arn:aws:iam::146910341356:user/MY_USERNAME is not authorized to perform: iam:ListUsers on resource: arn:aws:iam::146910341356:user/ |
* <code>aws iam list-user-policies --user-name USERNAME</code> | * <code>aws iam list-user-policies --user-name USERNAME</code> | ||
+ | |||
=== Basic AWS Security commands === | === Basic AWS Security commands === | ||
Line 81: | Line 76: | ||
=== Basic AWS ECS commands === | === Basic AWS ECS commands === | ||
− | * <code> | + | * <code>aws ecs list-clusters</code> |
− | === Basic | + | === Basic AWS Config service commands === |
* <code>aws configservice get-status</code> | * <code>aws configservice get-status</code> | ||
− | |||
== Networking == | == Networking == | ||
Line 93: | Line 87: | ||
== Related terms == | == Related terms == | ||
− | * | + | * [[google-cloud-sdk]] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == See Also == | + | ==See Also == |
− | * | + | * [[DevOps/Ansible/manage AWS infrastructure using Ansible]] |
− | * | + | * ''[[aliyun]]'' [[Alibaba Cloud Computing]] CLI |
− | * {{ | + | * {{EC2}} |
* {{Cloud CLIs}} | * {{Cloud CLIs}} | ||
− | + | * {{AWS}} | |
+ | * [[IBM Cloud]]: (IBM Cloud Cli) | ||
[[Category:Computing]] | [[Category:Computing]] | ||
− | [[Category: | + | [[Category:Internet]] |
Advertising: