welldone-cloud / aws-list-resources Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
I tried this and it's very nice, thanks.
The only thing I notice is that it's not listing my EC2 hosts, even though EC2 has the List operation
Any idea?
Hi,
I just tried to use your script to discover ec2 instances, but got empty responses. I don't know if --include-resource-types
is case sensitive (Is it?), so I tried both commands:
python aws_list_resources.py --regions us-east-1 --include-resource-types AWS::EC2::instance
python aws_list_resources.py --regions us-east-1 --include-resource-types AWS::EC2::Instance
The results were similar, in both commands:
{
"_metadata": {
"account_id": "***",
"account_principal": "arn:aws:iam::***:user/***",
"denied_list_operations": {
"us-east-1": []
},
"invocation": "aws_list_resources.py --regions us-east-1 --include-resource-types AWS::EC2::instance",
"run_timestamp": "20240327125325"
},
"regions": {
"us-east-1": {}
}
}
Hi,
I was just trying your script on Ubuntu 20.04, where it fails with a botocore configuration issue:
botocore.exceptions.InvalidRetryConfigurationError: Cannot provide retry configuration for "mode".
Valid retry configuration options are: 'max_attempts'
More details:
redacteduser@redactedhost:~/redacteddir$ lsb_release -ds
Ubuntu 20.04.5 LTS
redacteduser@redactedhost:~/redacteddir$ which python3
/usr/bin/python3
redacteduser@redactedhost:~/redacteddir$ dpkg -S /usr/bin/python3
python3-minimal: /usr/bin/python3
redacteduser@redactedhost:~/redacteddir$ apt list --installed python3-minimal
Listing... Done
python3-minimal/focal,now 3.8.2-0ubuntu2 amd64 [installed,automatic]
redacteduser@redactedhost:~/redacteddir$ git log -1 | grep ^commit
commit 7a9d46c373b23a1065ae1731474da110f2dcdbf8
redacteduser@redactedhost:~/redacteddir$ /usr/bin/python3 --version
Python 3.8.10
redacteduser@redactedhost:~/redacteddir$ $ pip3 install -r requirements.txt
Requirement already satisfied: boto3 in /home/redacteduser/.local/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (1.4.7)
Requirement already satisfied: s3transfer<0.2.0,>=0.1.10 in /home/redacteduser/.local/lib/python3.8/site-packages (from boto3->-r requirements.txt (line 1)) (0.1.13)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /home/redacteduser/.local/lib/python3.8/site-packages (from boto3->-r requirements.txt (line 1)) (0.10.0)
Requirement already satisfied: botocore<1.8.0,>=1.7.0 in /home/redacteduser/.local/lib/python3.8/site-packages (from boto3->-r requirements.txt (line 1)) (1.7.48)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/lib/python3/dist-packages (from botocore<1.8.0,>=1.7.0->boto3->-r requirements.txt (line 1)) (2.7.3)
Requirement already satisfied: docutils>=0.10 in /home/redacteduser/.local/lib/python3.8/site-packages (from botocore<1.8.0,>=1.7.0->boto3->-r requirements.txt (line 1)) (0.15.2)
redacteduser@redactedhost:~/redacteddir$ python3 ./aws_list_resources.py
Traceback (most recent call last):
File "./aws_list_resources.py", line 12, in <module>
boto_config = botocore.config.Config(
File "/home/redacteduser/.local/lib/python3.8/site-packages/botocore/config.py", line 135, in __init__
self._validate_retry_configuration(self.retries)
File "/home/redacteduser/.local/lib/python3.8/site-packages/botocore/config.py", line 181, in _validate_retry_configuration
raise InvalidRetryConfigurationError(
botocore.exceptions.InvalidRetryConfigurationError: Cannot provide retry configuration for "mode". Valid retry configuration options are: 'max_attempts'
redacteduser@redactedhost:~/redacteddir$
(Additional blank lines were added and redactions made as indicated)
Can you recommend how to solve this?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.