[Python] Using AWS Lambda to generate Inspector 2 findings in Json format (boto3)

Discussão em 'Python' iniciado por Stack, Maio 30, 2025.

  1. Stack

    Stack Membro Participativo

    using boto3 pagination function to generate Inspector finding but I want it to be dump into a json file.

    response_iterator = paginator.paginate
    #generates the response
    Data = response_iterator
    with open('temp.json','w') as outfile:
    json.dump(Data,outfile)
    outfile.close()


    Im getting this error below:

    'errorMessage':'object of type Pagiterator is not JSON serializable'
    'errorType':'TypeError'

    Continue reading...

Compartilhe esta Página