Skip to content

Commit d07ccf9

Browse files
author
Florian Chazal
committed
take care of comments
1 parent 810e0dc commit d07ccf9

File tree

8 files changed

+791
-808
lines changed

8 files changed

+791
-808
lines changed

docs/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Core utilities such as Tracer, Logger, Metrics, and Event Handler will be availa
2828

2929
## Installation
3030

31-
Powertools is available in the following formats:
31+
You can use Powertools through [AWS Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-concepts.html#gettingstarted-concepts-layer) or install it as your dependency via NPM:
3232

3333
* **Lambda Layer**: [**arn:aws:lambda:{region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:1**](#){: .copyMe}:clipboard:
3434
* **NPM**: **`npm install @aws-lambda-powertools/tracer @aws-lambda-powertools/metrics @aws-lambda-powertools/logger`**
@@ -102,13 +102,16 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
102102
export class SampleFunctionWithLayer extends Construct {
103103
constructor(scope: Construct, id: string) {
104104
super(scope, id);
105+
// Create a Layer with AWS Lambda Powertools for TypeScript
106+
105107
const powertoolsLayer = lambda.LayerVersion.fromLayerVersionArn(
106108
this,
107109
'PowertoolsLayer',
108110
`arn:aws:lambda:${cdk.Stack.of(this).region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:1`
109111
);
110112
new lambda.Function(this, 'Function', {
111113
runtime: lambda.Runtime.NODEJS_16_X,
114+
// Add the Layer to a Lambda function
112115
layers: [powertoolsLayer],
113116
code: lambda.Code.fromInline(`
114117
const { Logger } = require('@aws-lambda-powertools/logger');

layer-publisher/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Lambda Powertools for TypeScript Layer Publisher
22

3-
This CDK app is meant to be used to publish Powertools for TypeScript lambda layer. It is composed of a single stack deploying the layer into the target account.
3+
This CDK app is meant to be used to publish Powertools for TypeScript Lambda Layer. It is composed of a single stack deploying the Layer into the target account.
44

55
# Usage
66

@@ -32,7 +32,7 @@ npm run test:e2e
3232

3333
PS: You can force
3434
* the lambda runtime to test with the RUNTIME env variable
35-
* the powertools version with VERSION env variable
35+
* the Powertools version with VERSION env variable
3636
```sh
3737
RUNTIME=node12.x VERSION=0.9.0 npm run test:e2e
3838
```

0 commit comments

Comments
 (0)