• boto3获取aws lambda函数信息保存到excel


    #coding:utf8
    import boto3
    import xlwt
    lambda_client = boto3.client('lambda',region_name = 'cn-north-1')
    
    workbook = xlwt.Workbook()
    sheet1 = workbook.add_sheet('sheet1',cell_overwrite_ok=True)
    sheet1.write(0,0,"函数名")
    sheet1.write(0,1,"运行环境")
    sheet1.write(0,2,"代码大小")
    sheet1.write(0,3,"修改时间")
    # print(lambda_client.list_functions())
    llist = lambda_client.list_functions()
    # print(llist['Functions'])
    i = 1
    for l in llist['Functions']:
        sheet1.write(i,0,l['FunctionName'])
        sheet1.write(i,1,l['Runtime'])
        sheet1.write(i,2,l['CodeSize'])
        sheet1.write(i,3,l['LastModified'])
        print(l['FunctionName'])
        print(l['Runtime'])
        print(l['CodeSize'])
        print(l['LastModified'])
        print('...........................')
        i+=1
    
    workbook.save(u'lambda.xls')
  • 相关阅读:
    「考试」省选6
    「考试」省选5
    「考试」省选4
    「笔记」拉格朗日插值
    数学专测
    「笔记」$exlucas$
    「总结」$dp1$
    「总结」达哥数学专项
    「总结」筛法2
    「总结」莫反2
  • 原文地址:https://www.cnblogs.com/husbandmen/p/10234059.html
Copyright © 2020-2023  润新知