Measuring object size with getsizeof

One of my colleague was running a batch to insert records in AWS firehose stream and getting service unavailable exception continuously. Probably, batch was inserting more data than allowed per second. So We thought of adding a log statement which prints the size of records which are sent to firehose.…