Description
Summary
The layer-publisher
folder contains the utilities and tests used to publish AWS Lambda Layers for Powertools. Currently the folder has its own dependency tree and is disconnected from the main one.
We need to realign the versions of the dependencies related to AWS CDK present in the layer-publisher/package-lock.json
file with the ones in package-lock.json
.
Why is this needed?
Because layer-publisher
uses some utilities from packages/commons
and they both import modules from aws-cdk-lib
. If the two versions don't match (or at least are not close enough), the interfaces/prototypes of the imported classes will be different thus causing errors.
This happened in this e2e test run: https://github.com/awslabs/aws-lambda-powertools-typescript/actions/runs/3893483365
Notice in the errors that the App
class from aws-cdk-lib
appears to have different implementation/interface between the two imports.
Which area does this relate to?
Automation, Other
Solution
A short term solution that somewhat manually realigns the two dependency trees is proposed in the linked PR. The long term solution would be to make the layers-publisher
part of the main npm workspace, an activity that is tracked in #1226.
Acknowledgment
- This request meets Lambda Powertools Tenets
- Should this be considered in other Lambda Powertools languages? i.e. Python, Java