15 lines
393 B
Python
Executable File
15 lines
393 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
|
|
import boto3
|
|
|
|
client = boto3.client('config')
|
|
resp = client.get_discovered_resource_counts()
|
|
for item in resp['resourceCounts']:
|
|
print(item['resourceType'])
|
|
reslist = client.list_discovered_resources(resourceType=item['resourceType'])
|
|
count = 1
|
|
|
|
for i, res in enumerate(reslist['resourceIdentifiers'], 1):
|
|
print(i, res['resourceId'], sep=': ')
|