Skip to content
This repository was archived by the owner on Apr 5, 2025. It is now read-only.

Commit 597f5bb

Browse files
sthulbAlexander Melnykgithub-actions
authored
chore: change references to Powertools for AWS Lambda (#53)
* chore: change references to Powertools for AWS Lambda * fix tests * chore: self mutation Signed-off-by: github-actions <github-actions@github.com> --------- Signed-off-by: github-actions <github-actions@github.com> Co-authored-by: Alexander Melnyk <amelnyk@amazon.com> Co-authored-by: github-actions <github-actions@github.com>
1 parent 2dbacbd commit 597f5bb

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

.projenrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const project = new awscdk.AwsCdkConstructLibrary({
1010
majorVersion: 3,
1111
name: 'cdk-aws-lambda-powertools-layer',
1212
repositoryUrl: 'https://github.com/awslabs/cdk-aws-lambda-powertools-layer.git',
13-
description: 'A lambda layer for AWS Powertools for python and typescript',
13+
description: 'Powertools for AWS Lambda layer for python and typescript',
1414
devDeps: [
1515
'@types/prettier@2.6.0', // pin until breaking changes is resolved: https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/60310
1616
],

API.md

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# AWS Lambda powertools layer
1+
# Powertools for AWS Lambda Layer
22

33
## Why this project exists
44

5-
This is a custom construct that will create AWS Lambda Layer with AWS Powertools for Python or NodeJS library. There are different
5+
This is a custom construct that will create AWS Lambda Layer with Powertools for AWS Lambda for Python or NodeJS library. There are different
66
ways how to create a layer and when working with CDK you need to install the library, create a zip file and wire it
77
correctly. With this construct you don't have to care about packaging and dependency management. Create a construct
88
and add it to your function. The construct is an extension of the
@@ -49,7 +49,7 @@ pip install cdk-aws-lambda-powertools-layer
4949

5050
### Python
5151

52-
A single line will create a layer with powertools for python. For NodeJS you need to specifically set the `runtimeFamily: Runtime.NODEJS` property.
52+
A single line will create a layer with Powertools for AWS Lambda (Python). For NodeJS you need to specifically set the `runtimeFamily: Runtime.NODEJS` property.
5353

5454
```python
5555
from cdk_aws_lambda_powertools_layer import LambdaPowertoolsLayer

package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lambda-powertools-layer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { Architecture } from 'aws-cdk-lib/aws-lambda';
44
import { Construct } from 'constructs';
55

66
/**
7-
* Properties for Powertools layer for python.
7+
* Properties for Powertools for AWS Lambda (Python) Layer.
88
*/
99
export interface PowertoolsLayerProps {
1010
/**
11-
* The powertools package version from pypi repository.
11+
* The Powertools for AWS Lambda package version from pypi repository.
1212
*/
1313
readonly version?: string;
1414

@@ -35,7 +35,7 @@ export interface PowertoolsLayerProps {
3535
}
3636

3737
/**
38-
* Defines a new Lambda Layer with Powertools for python library.
38+
* Defines a new Lambda Layer with Powertools for AWS Lambda (Python) library.
3939
*/
4040
export class LambdaPowertoolsLayer extends lambda.LayerVersion {
4141
/**
@@ -99,7 +99,7 @@ export class LambdaPowertoolsLayer extends lambda.LayerVersion {
9999
layerVersionName: props?.layerVersionName ? props?.layerVersionName : undefined,
100100
license: 'MIT-0',
101101
compatibleRuntimes: getRuntimesFromRuntimeFamily(runtimeFamily),
102-
description: `Lambda Powertools for ${languageName} [${compatibleArchitecturesDescription}]${
102+
description: `Powertools for AWS Lambda (${languageName}) [${compatibleArchitecturesDescription}]${
103103
props?.includeExtras ? ' with extra dependencies' : ''
104104
} ${props?.version ? `version ${props?.version}` : 'latest version'}`.trim(),
105105
// Dear reader: I'm happy that you've stumbled upon this line too! You might wonder, why are we doing this and passing `undefined` when the list is empty?

test/lambda-powertools-python-layer.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('with no configuration the construct', () => {
1010
const template = Template.fromStack(stack);
1111
test('synthesizes successfully', () => {
1212
template.hasResourceProperties('AWS::Lambda::LayerVersion', {
13-
Description: 'Lambda Powertools for Python [x86_64] latest version',
13+
Description: 'Powertools for AWS Lambda (Python) [x86_64] latest version',
1414
});
1515
});
1616

@@ -41,7 +41,7 @@ describe('with arm64 architecture', () => {
4141
const template = Template.fromStack(stack);
4242
test('synthesizes successfully', () => {
4343
template.hasResourceProperties('AWS::Lambda::LayerVersion', {
44-
Description: 'Lambda Powertools for Python [arm64] latest version',
44+
Description: 'Powertools for AWS Lambda (Python) [arm64] latest version',
4545
CompatibleArchitectures: ['arm64'],
4646
});
4747
});
@@ -69,7 +69,7 @@ describe('with version configuration the construct', () => {
6969

7070

7171
Template.fromStack(stack).hasResourceProperties('AWS::Lambda::LayerVersion', {
72-
Description: 'Lambda Powertools for Python [x86_64] version 1.21.0',
72+
Description: 'Powertools for AWS Lambda (Python) [x86_64] version 1.21.0',
7373
});
7474
});
7575

@@ -88,7 +88,7 @@ describe('with version configuration the construct', () => {
8888
});
8989

9090
Template.fromStack(stack).hasResourceProperties('AWS::Lambda::LayerVersion', {
91-
Description: 'Lambda Powertools for Python [x86_64] with extra dependencies version 1.22.0',
91+
Description: 'Powertools for AWS Lambda (Python) [x86_64] with extra dependencies version 1.22.0',
9292
});
9393

9494
});
@@ -100,7 +100,7 @@ describe('with version configuration the construct', () => {
100100
});
101101

102102
Template.fromStack(stack).hasResourceProperties('AWS::Lambda::LayerVersion', {
103-
Description: 'Lambda Powertools for Python [x86_64] with extra dependencies latest version',
103+
Description: 'Powertools for AWS Lambda (Python) [x86_64] with extra dependencies latest version',
104104
});
105105
});
106106
});

test/lambda-powertools-typescript-layer.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('with minimal configuration the construct', () => {
1212
const template = Template.fromStack(stack);
1313
test('synthesizes successfully', () => {
1414
template.hasResourceProperties('AWS::Lambda::LayerVersion', {
15-
Description: 'Lambda Powertools for TypeScript [x86_64] latest version',
15+
Description: 'Powertools for AWS Lambda (TypeScript) [x86_64] latest version',
1616
});
1717
});
1818

@@ -58,7 +58,7 @@ describe('with version configuration the construct', () => {
5858

5959

6060
Template.fromStack(stack).hasResourceProperties('AWS::Lambda::LayerVersion', {
61-
Description: `Lambda Powertools for TypeScript [x86_64] version ${version}`,
61+
Description: `Powertools for AWS Lambda (TypeScript) [x86_64] version ${version}`,
6262
});
6363
});
6464

0 commit comments

Comments
 (0)