You seem to be (only) testing the encryption of a single file with a single key. How much data does get_lambda_functions() hold after the encryption? How much data does get_lambda_functions() hold when many small plaintexts are encrypted with many keys? Is this a possible memory leak?