michalvlcek / aws-commands
There is no license information available for the latest version (v0.1) of this package.
v0.1
2016-03-28 12:03 UTC
Requires
- php: >=5.4
- aws/aws-sdk-php: ^3.17
- symfony/console: ^3.0
- symfony/var-dumper: ^3.0
- vlucas/phpdotenv: ^2.2
This package is not auto-updated.
Last update: 2025-01-18 19:57:44 UTC
README
Useful (symfony) commands for working with AWS.
# installation
composer install
- create
.env
file from example (cp .env.example .env
) and setup credentials:- if you already have AWS credentials file
~/.aws/credentials
you can copy access keys from there - if you don't you can create new access keys at http://aws.amazon.com/developers/access-keys/
- if you already have AWS credentials file
# usage
php app.php
- for list of all commandsphp app.php name:of:command [[option] --argument]
# commands
ec2:hosts-info
Command which allows to grab information from all EC2 instances (across all regions and sub-accounts) in "hosts" style format.
Default call (with no argument) prints output to stdOut. If you set file
argument output is appended to specified file.
php app.php ec2:hosts-info # dump to std output
php app.php ec2:hosts-info --file=/etc/hosts # dump to file
results in:
12.12.123.123 SomeName # i-c12ab06c
12.12.12.1 AnotherName # i-05fce0883ca1d7f12
iam:assumed-roles
Command attempts to extract all possible assumed roles.
It is done by querying user associated groups and their policyes.
Command which allows to grab informations from all EC2 instances (across all regions) in "hosts" style format.
Default call (with no argument) prints output to stdOut. If you set file
argument output is appended to specified file.
php app.php iam:assumed-roles
results in:
array:2 [ 0 => array:2 [ "account" => "012345678901" "role" => "roleName" ], 1 => array:2 [ "account" => "112345678901" "role" => "anotherRoleName" ] ]