aws-powertools / powertools-lambda-typescript

Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.
https://docs.powertools.aws.dev/lambda/typescript/latest/
MIT No Attribution
1.53k stars 134 forks source link

Feature request: single meta-package #879

Closed m-radzikowski closed 1 year ago

m-radzikowski commented 2 years ago

Description of the feature request

Problem statement

With the powertools being published as separate, modular packages, you need to install multiple @aws-lambda-powertools/* packages. Modularization is great for both development and keeping the dependencies small. But if you want to use several utilities from the powertools, it becomes annoying to install them separately and bump versions of all of them when there is a new release.

Summary of the feature

Create and publish a meta-package that includes all of the utilities. It can be a package that has dependencies on all other packages. Then you can install just a single package and have all the powertools available.

If you use esbuild, webpack, or similar bundler with tree-shaking, this will not affect the output bundle size, as unused dependencies will be omitted. However, when not using such bundler, it will be a better option to install separate packages and pick only what you need.

Code examples

Usage can be as simple as:

npm install aws-lambda-powertools

Benefits for you and the wider AWS community

Similar to AWS CDK v2, it's easier to use the package with just a single dependency.

Describe alternatives you've considered

Installing all packages individually. The drawbacks are:

Additional context

Related issues, RFCs

#125

saragerion commented 2 years ago

Thanks for your proposal. I actually thought about it too. From a developer perspective, it would definitely simplify the installation and usage process. To manage expectations: we will discuss this and, if moved forward, this will be implemented after the GA milestone.

dreamorosi commented 1 year ago

Hi @m-radzikowski thank you for suggesting this feature.

At the moment, and for the foreseeable future, we are fully committed to offer a modular toolkit by publishing separate utilities to npm.

After talking with customers we have seen that most of them adopt Powertools gradually rather than all at once, and for this reason offering separate packages makes more sense and is in line with our tenet of allowing progressive adoption/enhancement.

For those customers who might want to have a single point of entry to Powertools or might want to reduce the operational overhead of managing dependencies, we recommend to look into adopting our Lambda Layers.

github-actions[bot] commented 1 year ago

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.