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) ==
* [[GitHub]]: https://github.com/aws/aws-cli/tags
+
AWS CLI is available in GitHub: https://github.com/aws/aws-cli/releases.
* [[ecr.aws]]: https://gallery.ecr.aws/aws-cli/aws-cli
 
  
== [[AWS cli Installation]] ==
+
=== Installation ===
 +
* Ubuntu, 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 ==
+
* Linux installation from Amazon:
 +
[[apt install]] -y [[curl]] [[unzip]]
 +
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
 +
[[unzip -q]] awscliv2.zip
 +
sudo ./aws/install
 +
 
 +
* <code>[[pip install]] awscli</code>
 +
 
 +
* [[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 22:
  
  
Execute <code>[[aws configure list]]</code> to view your actual configuration. If you execute for the first time will be something like:
+
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 25: Line 35:
 
* <code>[[aws configure list-profiles]]</code>
 
* <code>[[aws configure list-profiles]]</code>
  
=== Configuration files ===
+
=== Basic AWS EC2 commands <ref>https://docs.aws.amazon.com/cli/latest/reference/ec2/index.html</ref> ===
* <code>[[~/.aws/config]]</code>
 
* <code>[[~/.aws/credentials]]</code>
 
* <code>[[~/.aws/cli/alias]]</code>
 
 
 
== Basic [[AWS EC2]] commands <ref>https://docs.aws.amazon.com/cli/latest/reference/ec2/index.html</ref> ==
 
 
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 72: Line 77:
 
* <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::146910241356:user/
+
::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 87:
  
 
=== Basic AWS ECS commands ===
 
=== Basic AWS ECS commands ===
* <code>[[aws ecs list-clusters]]</code>
+
* <code>aws ecs list-clusters</code>
  
 
=== Basic [[AWS Config]] service commands ===
 
=== Basic [[AWS Config]] service commands ===
Line 87: Line 93:
  
  
* <code>[[aws ssm-incidents]]</code>
+
* [[aws ssm-incidents]]
  
 
== Networking ==
 
== Networking ==
Line 96: Line 102:
 
* <code>[[sam]]</code>
 
* <code>[[sam]]</code>
 
* <code>[[eksctl]]</code>, official AWS cli to manage [[EKS]] clusters
 
* <code>[[eksctl]]</code>, official AWS cli to manage [[EKS]] clusters
* [[Boto]] python library
+
* [[Boto]]
 
* <code>[[aws sts get-caller-identity]]</code>
 
* <code>[[aws sts get-caller-identity]]</code>
 
* <code>[[suaws]]</code>
 
* <code>[[suaws]]</code>
 
* [[auto-prompt]]
 
* [[auto-prompt]]
* <code>[[AWS_PROFILE]], [[AWS_CLI_AUTO_PROMPT]]</code>
 
* <code>[[aws list all]]</code>
 
* [[AWS Management Console]]
 
* [[aws-encryption-cli]]
 
* [[AWS functions]]
 
  
== See Also ==
+
==See Also ==
* {{aws cli config}}
 
 
* {{aws cli}}
 
* {{aws cli}}
* {{AWS IaC}}
+
* {{EC2}}
 
* {{Cloud CLIs}}
 
* {{Cloud CLIs}}
 
+
* {{AWS}}
  
 
[[Category:Computing]]
 
[[Category:Computing]]
 
[[Category:AWS]]
 
[[Category:AWS]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: