powertools-lambda-python icon indicating copy to clipboard operation
powertools-lambda-python copied to clipboard

Docs: Packaging Assets with Pants

Open TonySherman opened this issue 2 years ago • 7 comments

What were you searching in the docs?

The Micro Function Pattern with Event Handler.

Is this related to an existing documentation section?

https://docs.powertools.aws.dev/lambda/python/latest/core/event_handler/api_gateway/#micro-function

How can we improve?

There is a link that references using lambda layers or Pants Build to package lambda code. Pants has made significant improvements in packaging lambdas and packaging lambda layers and using rust to infer both internal and external dependencies.

It would be nice to see some examples of how to package lambda functions with Pants.

Got a suggestion in mind?

Pants does have some initial setup that is well documented, but it does take some time to set up instrumentation. Code snippets can be helpful, but a fully instrumented demo repo might be the best way to show how Pants can really help with packaging lambda code.

Acknowledgment

  • [X] I understand the final update might be different from my proposed suggestion, or refused.

TonySherman avatar Dec 15 '23 14:12 TonySherman

Thanks for opening your first issue here! We'll come back to you as soon as we can. In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

boring-cyborg[bot] avatar Dec 15 '23 14:12 boring-cyborg[bot]

@TonySherman thank you so much for opening this issue. Pants is something that have been on my radar for quite some time but I never had the proper time to give it a try. I agree that more people could benefit from such as example. Is this something you can contribute with? I would love to review it and give it a try.

rubenfonseca avatar Dec 15 '23 14:12 rubenfonseca

I am happy to help contribute! I also asked in the Pants slack if they would be interested in a serverless demo repo. They have several demo repos already and I wonder if a demo repo would help since it could be a full example with Pants tooling setup. I feel like the initial configuration for Pants takes a little time but it's certainly worth it once set up.

TonySherman avatar Dec 15 '23 14:12 TonySherman