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

Commit 09ddaef

Browse files
committed
chore: addressed code review feedback
1 parent 52984d6 commit 09ddaef

4 files changed

+11
-15
lines changed

layer/Python/Dockerfile

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ WORKDIR /tmp
1010
# PACKAGE_SUFFIX = '=='2.0.0'
1111
# PACKAGE_SUFFIX = ''
1212

13-
RUN yum update -y && yum install -y zip unzip wget tar gzip
13+
RUN yum update -y && yum install -y zip unzip wget tar gzip binutils
1414

1515
RUN pip install -t /asset/python aws-lambda-powertools$PACKAGE_SUFFIX
1616

@@ -23,8 +23,4 @@ RUN cd /asset && \
2323
# remove tests
2424
find python -wholename "*/tests/*" -type f -delete && \
2525
# remove python bytecode
26-
find python -regex '^.*\(__pycache__\|\.py[co]\)$' -delete && \
27-
# zip layer
28-
zip -r9 aws-lambda-powertools.zip ./python && \
29-
# delete original
30-
rm -rf ./python
26+
find python -regex '^.*\(__pycache__\|\.py[co]\)$' -delete

src/lambda-powertools-layer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ export class LambdaPowertoolsLayer extends lambda.LayerVersion {
9595
license: 'MIT-0',
9696
compatibleRuntimes: getRuntimesFromRuntimeFamily(runtimeFamily),
9797
compatibleArchitectures,
98-
description: `Lambda Powertools for ${languageName}${
99-
props?.includeExtras ? ' with Extras' : ''
98+
description: `Lambda Powertools for ${languageName} [${compatibleArchitectures.map(x => x.name).join(', ')}]${
99+
props?.includeExtras ? ' with extra dependencies' : ''
100100
} ${props?.version ? `version ${props?.version}` : 'latest version'}`.trim(),
101101
});
102102
}

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

+5-5
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 latest version',
13+
Description: 'Lambda Powertools for Python [x86_64] latest version',
1414
});
1515
});
1616

@@ -40,7 +40,7 @@ describe('with arm64 architecture', () => {
4040
const template = Template.fromStack(stack);
4141
test('synthesizes successfully', () => {
4242
template.hasResourceProperties('AWS::Lambda::LayerVersion', {
43-
Description: 'Lambda Powertools for Python latest version',
43+
Description: 'Lambda Powertools for Python [arm64] latest version',
4444
CompatibleArchitectures: ['arm64'],
4545
});
4646
});
@@ -68,7 +68,7 @@ describe('with version configuration the construct', () => {
6868

6969

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

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

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

9393
});
@@ -99,7 +99,7 @@ describe('with version configuration the construct', () => {
9999
});
100100

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

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

+2-2
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 latest version',
15+
Description: 'Lambda Powertools for TypeScript [x86_64] latest version',
1616
});
1717
});
1818

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

5858

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

0 commit comments

Comments
 (0)