Git Product home page Git Product logo

aws-cli-user-guide's Introduction

aws-cli-user-guide's People

Contributors

24rochak avatar adamtharani avatar armaghan-behlum avatar barlik avatar bcdady avatar bisdavid avatar chibie avatar dennisroche avatar dralbert avatar elysahall avatar felicianotech avatar hyandell avatar iyadkandalaft avatar janza avatar jeroenvb3 avatar jmino avatar joshbean avatar jschwarzwalder avatar kaiwensun avatar kdaily avatar lucasmior avatar luketn avatar micahlc avatar mwunderl avatar opus4210 avatar pixelsailor avatar praveenraghav01 avatar tedivm avatar torinthiel avatar xmubeta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-cli-user-guide's Issues

The instructions "Installing the AWS CLI version 2 on Linux" do not result in a functional AWS CLI

Following the instructions Installing the AWS CLI version 2 on Linux

First, uninstall AWS CLI version 1 (https://github.com/awsdocs/aws-cli-user-guide/blob/master/doc_source/install-linux-al2017.md)

$ sudo pip uninstall awscli
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Found existing installation: awscli 1.18.119
Uninstalling awscli-1.18.119:
  Would remove:
    /usr/bin/aws
    /usr/bin/aws.cmd
    /usr/bin/aws_bash_completer
    /usr/bin/aws_completer
    /usr/bin/aws_zsh_completer.sh
    /usr/lib/python2.7/site-packages/awscli-1.18.119-py2.7.egg-info
    /usr/lib/python2.7/site-packages/awscli/*
Proceed (y/n)? y
  Successfully uninstalled awscli-1.18.119

Then, proceed to Install the AWS CLI version 2 on Linux

$ sudo curl -so awscliv2.zip https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
$ sudo unzip -q awscliv2.zip
$ sudo ./aws/install
You can now run: /usr/local/bin/aws --version
$ /usr/local/bin/aws --version
-bash: /usr/local/bin/aws: Permission denied
$ ll /usr/local/bin/aws
lrwxrwxrwx. 1 root root 37 Sep 30 21:41 /usr/local/bin/aws -> /usr/local/aws-cli/v2/current/bin/aws
$ ll /usr/local/aws-cli/v2/current/bin/aws
ls: cannot access /usr/local/aws-cli/v2/current/bin/aws: Permission denied
$ ll /usr/local/
total 0
drwxr-----. 3 root root 16 Sep 30 21:41 aws-cli
drwxr-xr-x. 2 root root 51 Sep 30 21:41 bin
drwxr-xr-x. 2 root root  6 Apr  9  2019 etc
drwxr-xr-x. 2 root root  6 Apr  9  2019 games
drwxr-xr-x. 2 root root  6 Apr  9  2019 include
drwxr-xr-x. 2 root root  6 Apr  9  2019 lib
drwxr-xr-x. 2 root root  6 Apr  9  2019 lib64
drwxr-xr-x. 2 root root  6 Apr  9  2019 libexec
drwxr-xr-x. 2 root root  6 Apr  9  2019 sbin
drwxr-xr-x. 5 root root 49 Feb 12  2020 share
drwxr-xr-x. 2 root root  6 Apr  9  2019 src

Using Amazon Linux 2, all the executables under /usr/local/aws-cli are 740, so they don't work for any local users other than root.
Using Amazon Linux, all the executables under /usr/local/aws-cli are 700, so they don't work for any local users other than root either.

list-profiles requires both config and credentials

Hello,

I am no expert so could be me. It seems you can 'list-profiles' unless you actually update both credentials and config. In the documentation is reads as if you can do either 'or'. It makes sense that you need to match credentials, which makes me wonder when configuring config is useful.

https://github.com/awsdocs/aws-cli-user-guide/blob/master/doc_source/cli-configure-profiles.md

To replicate my issue. Added named profile to config. Try to list-profile, it won't show. Also, aws configure list behaves slightly unexpectedly when there is no default (it seems to run slow when dumping information).

Happy to provide reworked copy if I am correct, else happy if someone can correct me!

AWS-Shell should not be promoted on the marketing website for CLI

This is the marketing website, but it is AWS Docs, and its quite misleading.

So here at https://aws.amazon.com/cli/ it talks about the AWS Shell

image

The problem is that this project has not had any code updates since 2020 and is throwing errors.

awslabs/aws-shell#266

It looks like AWS-Shell was rolled directly into the AWS CLI since you can run the following command and get a similar experience.

aws --cli-auto-prompt

The issue is that to me it looked like an active project, and so I spent a good chunk of my day preparing free video content to learn this tool, but it doesn't look like it should be used.

Help Wanted - Examples that Illustrate How to Do Important Common Tasks

Hey everyone! We're always on the lookout for good examples that illustrate "best practices" for performing common tasks using the AWS CLI. We provide as many samples as we can when we first publish a guide, but only you know what you use the CLI for on a daily basis. What common tasks have you automated with the AWS CLI that others could learn from? Share your examples with us!

Submit a pull request as explained in these directions: https://github.com/awsdocs/aws-cli-user-guide/blob/master/CONTRIBUTING.md

Thank you!
Dave Bishop

ModuleNotFoundError AWS CLI V2

Hello guys
seems on my windows its not working.

First i install AWS CLI V2 here :
https://awscli.amazonaws.com/AWSCLIV2.msi

then open my cmd.exe execute this command :
aws --version

and here what i got :

C:\Windows\System32>aws --version
Traceback (most recent call last):
  File "C:\Users\Marketkoin\AppData\Local\Programs\Python\Python38-32\Scripts\aws.cmd", line 50, in <module>
    import awscli.clidriver
ModuleNotFoundError: No module named 'awscli'

even after i am adding the path manually from :
C:\Program Files\Amazon\AWSCLIV2

to my environment path variable, the problem still persist.

thx

aws cloudfront update-distribution

From the directions on the page:

The update process includes getting the current distribution configuration, updating it to make your changes, and then submitting an UpdateDistribution request to make the updates.

To update a web distribution using the CloudFront API

Use GetDistributionConfig to get the current configuration, including the version identifier (ETag ).

Update the distribution configuration that was returned in the response. Note the following important requirements and restrictions:

You must rename the ETag field to IfMatch , leaving the value unchanged. (Set the value of IfMatch to the value of ETag , then remove the ETag field.)

You can’t change the value of CallerReference .

Submit an UpdateDistribution request, providing the distribution configuration. The new configuration replaces the existing configuration. The values that you specify in an UpdateDistribution request are not merged into your existing configuration. Make sure to include all fields: the ones that you modified and also the ones that you didn’t.

When I get the file, I change the field from ETag to IfMatch, but I am getting errors regarding the format of the json.

Parameter validation failed:
Missing required parameter in DistributionConfig: "CallerReference"
Missing required parameter in DistributionConfig: "Origins"
Missing required parameter in DistributionConfig: "DefaultCacheBehavior"
Missing required parameter in DistributionConfig: "Comment"
Missing required parameter in DistributionConfig: "Enabled"
Unknown parameter in DistributionConfig: "IfMatch", must be one of: CallerReference, Aliases, DefaultRootObject, Origins, OriginGroups, DefaultCacheBehavior, CacheBehaviors, CustomErrorResponses, Comment, Logging, PriceClass, Enabled, ViewerCertificate, Restrictions, WebACLId, HttpVersion, IsIPV6Enabled
Unknown parameter in DistributionConfig: "DistributionConfig", must be one of: CallerReference, Aliases, DefaultRootObject, Origins, OriginGroups, DefaultCacheBehavior, CacheBehaviors, CustomErrorResponses, Comment, Logging, PriceClass, Enabled, ViewerCertificate, Restrictions, WebACLId, HttpVersion, IsIPV6Enabled

Top of the file that comes through looks like this,

{
    "ETag": "{{ cloudfront_distribution_id }}",
    "DistributionConfig": {
        "CallerReference": "{{ caller_reference }} ",
        "Aliases": {
            "Quantity": 1,
            "Items": [
           ....
}

When I remove the outmost brackets, the Etag and "DistributionConfig": It fails for not having IfMatch.

Unable to Update AWS ECS Services and Tasks

Hi,
I'm unable to run "aws ecs update-service --force-new-deployment --cluster {{cluster-name}} --service {{service-name}}" command after upgrading to "aws-cli/2.0.6 Python/3.7.5 Windows/10 botocore/2.0.0dev10".

The mentioned command was working fine with "aws-cli/1.17.9 Python/3.6.9 Linux/4.4.0-18362-Microsoft botocore/1.14.9".

The process stucks halfway with ":" message in the terminals (WSL/Powershell) . If at all I press "Enter-Key" it resumes back again, but I constantly have to press the Enter-Key all the time. This is a new issue I'm facing after the upgrade. FYI, I have tried the same with Windows and WSL terminals, no luck till now. I have to switch back to the older version again due to this problem.

Mention of snap package

There is a verified aws-cli package on Snapcraft1. I think it would be wise to advertise this package for Linux desktop users.

Installing in termux (and possibly other prefix environments)

Termux is a popular way to get a Linux shell running very easily on Android without the need for root. As such it is a prefixed environment (https://wiki.termux.com/wiki/FAQ#Is_Termux_a_complete_Linux_Environment.3F) so installing it using the --user option prevents it from working. Simply omitting the --user option from the install command string allows it to work as expected.

The documentation should be updated to reflect this as it is not obvious to the uninitiated (like myself.) I was unable to find any guidance in all of my searching to lead me to this and only figured it out via dumb luck and not giving up. It order to make installing easier for others using termux, and possibly other prefixed environments, please note this in both the main install page and the Linux install page of the documentation.

Potential security issue with this command

Good Day ,

In "https://docs.aws.amazon.com/cli/latest/userguide/cli-services-ec2-sg.html#configuring-a-security-group"
You mention the following security group configuration :

"aws ec2 authorize-security-group-ingress --group-id sg-903004f8 --protocol tcp --port 3389 --cidr 203.0.113.0/24"

This can form a potential security risk.

I have simplified the security group configuration to the following two lines to ensure that only 1 IP address has RDP access to the instance the security group has been linked to .

#Retrieve public IP and store in variable
@for /f "delims=" %i in ('curl https://checkip.amazonaws.com') DO set IP=%i/32

#Grant Access to single IP stored in variable
aws ec2 authorize-security-group-ingress --group-id sg-903004f8 --protocol tcp --port 3389 --cidr %IP%

CLI V2 `brew` installation option for Mac OS

Why not mentioning the brew method to install the AWS CLI in the documentation https://github.com/awsdocs/aws-cli-user-guide/blob/master/doc_source/install-cliv2-mac.md?

brew is a common Mac package manager which is very convenient to install and upgrade the AWS CLI:

  • Installation: brew install awscli
  • Upgrade: brew upgrade awscli

Set vs Setx

Instructions for setting the proxy on a windows host mentions using the 'setx' command. Variables set with this command cannot be used by the AWS CLI.

The example provided should be using SET as opposed to SETX:

C:\> set HTTP_PROXY=http://10.15.20.25:1234
C:\> set HTTP_PROXY=http://proxy.example.com:1234
C:\> set HTTPS_PROXY=http://10.15.20.25:5678
C:\> set HTTPS_PROXY=http://proxy.example.com:5678

Once set is used, the CLI is able to read the variables and use the proxy as defined.

CLI V2 install prerequisites

Hi,
For the V2 of the CLI, the output changed to be paginated by default and it uses the commands less for mac and linux, and the command more for windows. As far as I know there is no way for windows to not have the command unless explicitly uninstalled, but for some linux distributions it could happen.
This issue brought this to our attention, and I wanted to see if we can add less to the list of requirements for linux at least.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.