Skip to content

Instantly share code, notes, and snippets.

@romanbsd
Created October 18, 2023 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romanbsd/7901c3d53e2345c2d73c15a554b58d72 to your computer and use it in GitHub Desktop.
Save romanbsd/7901c3d53e2345c2d73c15a554b58d72 to your computer and use it in GitHub Desktop.
List preinstalled packages on AWS lambda
from pkg_resources import working_set
def lambda_handler(event, context):
print(*(f'{m.key}~={m.version}' for m in sorted(working_set, key=lambda x: x.key)), sep='\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment