Giter VIP home page Giter VIP logo

aws-utils's Introduction

Steve Kemp

Personal details:

  • Location: Helsinki, Finland.
    • Nationality: British Citizen.
  • Occupation: Sysadmin / Devops / Cloud-person.

Overview:

  • I've been programming for over half my life, I'm comfortable creating, developing, maintaining, and improving software written in multiple languages
    • Including C, C++, Emacs Lisp, Perl, Ruby, Java, Shell, & TCL.
    • Most of my personal projects are written in Golang and Rust.
  • My interests primarily revolve around compilers, interpreters, domain-specific languages, and virtual machines.
  • I'm also interested in retro programming/projects, primarily based around the Z80 processor.

Surveys & Email Harvesting

I explicitly do not consent to receiving your "research surveys", or other contact generated via email scraping of the Github service. Such contact will always be followed up with.

Github Activity

aws-utils's People

Contributors

skx avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

aws-utils's Issues

Output subnet information ..

For a current penetration test I need to output a list of subnets:

  • Name.
  • CIDR Range.

Would be far easier to do if I had a subnets sub-command.

instances-subcommand should be templated

Right now the implementation of the sub-command contains things like this:

			// details
			fmt.Printf("\tAMI: %s\n", ami)
			fmt.Printf("\tInstance type: %s\n", *instance.InstanceType)

			if instance.KeyName != nil {
				fmt.Printf("\tKey name: %s\n", *instance.KeyName)
			}

This looks ugly, and is hard for users to modify. Instead of that define a golang text/template snippet and use a struct as appropriate to allow changing the formatting and included values. This could also pave the way towards a JSON-output option.

Simplify implementation of role-based commands

Several of our commands now operate either on the main AWS account, or a set of roles assumed from it:

  • csv-instances
  • instances
  • sg-grep

Rather than duplicating all the code create a helper which does that once, and triggers a callback into the sub-command for the handling.

rotate-keys trashes other profiles

This configuration file is fine:

wc41 ~ $ cat ~/.aws/credentials 
[default]
aws_access_key_id=1234...
aws_secret_access_key=abc...

But the moment you have other profiles present as well things break:

 $ cat ~/.aws/credentials 
[default]
aws_access_key_id=1234..
aws_secret_access_key=abc..

[tmp]
aws_secret_access_key=124.
aws_access_key_id=blah
aws_session_token=secret

Specifically the values of all the keys get updated, not just the first one.

I guess we just replace the first value, not all the values, and that will solve this.

Allow the user to specify the columns to show for csv-instances

Today I was asked to provide a mapping of "name + IPv4" address for a bunch of accounts. This would have been easier if I could run:

  $ aws-utils csv-instances --fields="name,ipv4"

Of course once I realize this I can also say that the instances and csv-instances are very very similar (which they definitely are). Merging the two commands into one almost makes sense, but I use them for different purposes and it would be nice to keep the simple nature alone.

To close this issue:

  • Remove the duplication between the two commands, with regard to getting the data at least.
  • Allow the user to specify different fields for the CSV instnace, at least.
    • Ideally a template for the instances subcommand too.

No changes to the default behaviour from the end-user perspective though, even if they gain the ability to change the formatting/templates.

The `stacks` sub-command sometimes misses stacks

When a stack is present in multiple states it might get excluded.

  • Imagine you create a stack, then delete it.
  • Later you create a stack with the same name.

This results in two stacks in the list-stack output :

  • One in DELETE_COMPLETE state
  • One in CREATE_COMPLETE state

Depending on the random ordering this might get excluded. We need to build/maintain a list of the stack-stats not a simple key=>value hash, which will overwrite the stack-details.

Instance names are not always set

Receiving an error with empty instances here:

% AWS_SDK_LOAD_CONFIG=1 aws-utils  instances   

errors running instance dump
error invoking callback: error rendering template template: output:2:2: executing "output" at <.InstanceName>: can't evaluate field InstanceName in type []instances.InstanceOutput
Steve.Kemp@Steves-MacBook-Pro .aws % 

Allow deactivation/deletion of AWS access-keys

Hello,

thanks for this neat utility, I mostly use it to rotate AWS access-keys.
To that effect, would it be possible to add flags to the rotate-keys command to allow for deactivation/deletion of the previous, now rotated keys?

Thanks.

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.