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

Feature (all): single meta-package

Open m-radzikowski opened this issue 2 years ago • 1 comments

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:

  • more packages to maintain in package.json
  • more packages to update the version

Additional context

Related issues, RFCs

#125

m-radzikowski avatar May 16 '22 10:05 m-radzikowski

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.

saragerion avatar May 16 '22 10:05 saragerion

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.

dreamorosi avatar Aug 02 '23 16:08 dreamorosi

⚠️ 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.

github-actions[bot] avatar Aug 02 '23 16:08 github-actions[bot]