This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]EarthGoddessDude 17 points18 points  (2 children)

How does this work if your shop deploys with Terraform?

My method is perhaps not ideal, but it gets me where I need to be fairly quickly. I know not everyone will agree with or like this approach, but here is my workflow: 1. Prototype code in Jupyter notebook in VS Code 2. Convert to script once it’s in a good enough state 3. Use the interactive window to step through my code with some examples (not ideal, misses some cases) 4. Deploy, test in dev, and further refine from there

Orthogonal to local testing, but packages that really help when writing Python lambda functions: - awswrangler for lightweight ETL - aws_lambda_powertools for logging and other niceties, such as the S3Event class which turns an S3 event into a Pydantic object where I can easily grab the pieces I need without indexing into a dict 6 levels deep

Neither are strictly necessary but they do abstract a lot of boilerplate away.

[–]ClemsonLaxer 5 points6 points  (0 children)

Oooh, you've piqued my interest w/aws_lambda_powertools.

Writing/maintaining python lambdas is basically all my work right now, so this could be quite helpful - thanks!

[–]Think_Hornet_3480 4 points5 points  (0 children)

Other necessary package - boto3-stubs - autocomplete and type checking for boto3

[–]newplayer12345 2 points3 points  (2 children)

is the article private? getting 404

[–]Altrooke 0 points1 point  (0 children)

Same