(powertools-layer): ability to import the latest version of the lambda powertools layer
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
it would be great to have the ability to call on the latest version of the lambda powertools layer for use in Lambda functions. It is currently possible with other Lambda layers including AppConfig one & Lamda insights [Example](https://github.com/aws/aws-cdk/blob/06d2742b3fe9f9028d04e6660b654440ff9ca6e7/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts#L191).
Ideally would love to have an implemetation like
```typescript
const fn = new Function(this, 'foo', {
layers: [PowertoolsForAwsLambda.NODEJS_LATEST]
});
```
### Use Case
At the moment there is no automated solution for powertools and we are reliant on manually updating an SSM parameter which holds the ARN of the layer.
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.144.0
### Environment details (OS name and version, etc.)
OSX14.5
Contributor guide
Research direction
The related data is in packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts; start by comparing the existing AppConfig and Lambda Insights layer entries and tracing how those facts become CDK constants. Add the Powertools latest-layer entry exposed through the proposed NODEJS_LATEST API, then verify the generated regional data and relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100