Giter Club home page Giter Club logo

awscli-aliases's Introduction

awscli-aliases

Repository for AWS CLI aliases.

Requirements

Make sure that you are using version 1.11.24 or higher of the AWS CLI. You can determine the version by running:

$ aws --version

For information on installation and upgrading of the AWS CLI, please refer to the AWS CLI User Guide.

Quickstart

To start using aliases available in this repository, run the following commands:

Note that running the commands below will delete any existing alias file you may have had:

$ git clone https://github.com/awslabs/awscli-aliases.git
$ mkdir -p ~/.aws/cli
$ cp awscli-aliases/alias ~/.aws/cli/alias

To test that the aliases now work, run the following alias:

aws whoami

This will display the same response as the aws sts get-caller-identity command:

{
    "Account": "012345678901",
    "UserId": "AIUAINBADX2VEG2TC6HD6",
    "Arn": "arn:aws:iam::012345678901:user/myuser"
}

Dependencies

tostring alias

The tostring alias requires to have the jp command installed.
For installing the command line interface for JMESPath (jp), please see the README.md at https://github.com/jmespath/jp

tostring-with-jq alias

The tostring-with-jq alias requires to have the jq command installed.
For installing the Command-line JSON processor (jq), please see this page: https://stedolan.github.io/jq/download/

awscli-aliases's People

Contributors

colinhoglund avatar hyandell avatar jamesls avatar kyleknap avatar mbainter avatar tchia04 avatar tylerjryan 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

awscli-aliases's Issues

'f' is not recognized as an internal or external command

Hi there,

When I try to run command that have alias functions, I'm getting this:

'f' is not recognized as an internal or external command, operable program or batch file.

Do you know what might be the issue that I'm getting this?

Can't use --profile

I am trying to use --profile in my alias, but awscli is not forwarding it. It would also be acceptable for me if it instead set AWS_PROFILE since that would make things work in most cases.

Example alias:

test-args =
  !f() {
    echo arguments: $*
    echo profile: $AWS_PROFILE
  }; f

Output:

$ aws test-args test --profile admin
arguments: test
profile:
$ aws test-args test --profile2 admin
arguments: test --profile2 admin
profile:

It would be great if I would get this result:

$ aws test-args test --profile admin
arguments: test
profile: admin

Thanks!

Edit: The same thing happens with --region.

bash autocomplete

Hi,
Awesome feature with the aliases, I really like it
Is there a way to get autocomplete for aliases, or will this be implemented later?

-Andreas Knifh

Functions ignore command line options

Is there a good way to pass command line options to aliases using functions? This would be very useful in supporting multiple profiles, regions, etc. , just seems a bit out of step with the support in the CLI and SDK.

QuickSight

QuickSight has an annoyance that it always requires the --aws-account-id parameter.

qs =
  !f() {
    AWS_ACCOUNT_ID=$(sts get-caller-identity --query="Account" --output=text)
    aws quicksight --aws-account-id="$AWS_ACCOUNT_ID" $*
  }; f

Anyone at the helm?

This is a great feature of the CLI, but it appears this repo has stagnated. Is there anyone managing this project?

While it's super-useful to add the "I need this now" feature, one needs some guidance to ensure some level of consistency.

Are there any other alias repos in existence?

Support multiple alias files

  • To ease organisation and allow specialisation: aliases may be named with a suffix (such as alias.ec2, alias.s3)
  • To accelerate collaboration (say, by allowing easy merging of pull requests)

Cannot use options for echo command

Hi there,

When I used echo command in alias function, -n option is not used by echo as follows:

foo =
  !f() {
    echo -n 1
  }; f
$ aws foo
-n 1

But, ls command can use options successfully:

bar =
  !f() {
    ls
  }; f

baz =
  !f() {
    ls -l
  }; f
$ aws bar
file1	file2

$ aws baz
total 0
-rw-r--r--  1 aibou  staff  0  3 16 15:20 file1
-rw-r--r--  1 aibou  staff  0  3 16 15:20 file2

It seems a bug but I can't understand why ONLY echo behave it...

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.