https://github.com/mtulio/aws-resources
Tool to find AWS resources on an centralized place. Usefull for whom wants to manage multiple accounts and does not use AWS Organizations.
https://github.com/mtulio/aws-resources
Last synced: 11 months ago
JSON representation
Tool to find AWS resources on an centralized place. Usefull for whom wants to manage multiple accounts and does not use AWS Organizations.
- Host: GitHub
- URL: https://github.com/mtulio/aws-resources
- Owner: mtulio
- Created: 2018-09-07T21:59:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-17T04:44:33.000Z (over 7 years ago)
- Last Synced: 2025-02-24T03:17:43.071Z (over 1 year ago)
- Language: Python
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aws-resources
`aws-resources` is an tool to find AWS resources on distributed accounts using
assume roles (without exporting vars for each account).
Useful for whom wants to manage multiple accounts and does not use AWS Organizations.
## Setup
Create JSON with AWS accounts config:
```json
{
"AWS_ORGANIZATIONS": {
"name": "My Org",
"AWS_ACCOUNTS": [
{
"id": "123456789012",
"alias": "root",
"assume_role_name": "script-iam-role-access"
},
{
"id": "123456789013",
"alias": "prod",
"assume_role_name": "script-iam-role-access"
}
]
}
}
```
## AWS IAM Lookup
Lookup IAM Access ID in different AWS Accounts.
* Lookup one access key ID:
`time python3 cli_iam.py find-access-key --config ${PWD}/config.json --access-key AKIAXXXXXXXXXXXXX |jq .`
* Lookup one or more access keys ID:
`time python3 cli_iam.py find-access-keys --config ${PWD}/config.json --access-keys AKIAXXXXXXXXXXXXX,AKIAYYYYYYYYY |jq .`
## AWS EC2
### Instances
* Dump instances to CSV format with main attributes:
```bash
$ python cli_ec2.py describe-instances
instance_id;name;state;ip_private;ip_public
t2.nano;i-c4b9328afa0b78697;monkey;running;10.10.0.1;11.22.33.44
```
## SETUP
* install boto3
`pip install boto3`
## HELP
* [AWS Assume Role in Python](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-api.html)