I am new to Python. I have a script (in AWS Lambda function) that loops over my AWS workspace items and prints out some info, however, it only prints out about 25 of the items instead of 200+ items. So I turned to paginators. But it is not working as the script is not printing out the info. Rather it is printing "uh oh".
Here is the script:
from pprint import pprint
client = boto3.client('workspaces')
final_detail = []
final_detail.append(['ComputerName', 'WorkspaceId', 'IpAddress', 'state', 'UserName', 'BundleId', 'WorkspaceProperties'])
paginator = client.get_paginator('describe_workspaces')
try:
for workspaces in paginator.paginate():
for workspaceInfo in workspaces:
each_detail = workspaceInfo["ComputerName"], ["WorkspaceId"],["IpAddress"], ["state"], ["UserName"], ["BundleId"], ["WorkspaceProperties"]
final_detail.append(each_detail)
#print(final_detail)
except = None
print(uh oh)