From cb809d823071c132a5379ae2a4f07faf7829bff6 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 May 2022 12:01:39 +0000 Subject: [PATCH 01/12] chore: updated contributing & docs with SAM --- CONTRIBUTING.md | 26 ++++++++++++++++++-------- README.md | 3 ++- docs/index.md | 1 + packages/commons/README.md | 3 ++- packages/logger/README.md | 3 ++- packages/metrics/README.md | 3 ++- packages/tracing/README.md | 3 ++- 7 files changed, 29 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 301a291d15..9b6c4d0184 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,6 +66,7 @@ The following tools need to be installed on your system prior to starting workin - If you use [nvm](https://github.com/nvm-sh/nvm#nvmrc) or [fnm](https://github.com/Schniz/fnm) you can install the latest LTS version with `nvm use` or `fnm use` respectively. Both will use the `.nvmrc` file in the project's root. - [npm 8.x](https://www.npmjs.com/) - After installing Node.js, you can install `npm` with `npm install -g npm@next-8` +- [AWS SAM CLI >= 1.39.0](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) - [Docker](https://docs.docker.com/get-docker/) - If you are not planning on making changes to the documentation, you can skip this step. @@ -77,6 +78,7 @@ cd aws-lambda-powertools-typescript npm ci; cd examples/cdk; npm ci cd ../.. +cd examples/sam; npm ci npm run init-environment ``` @@ -195,23 +197,31 @@ You can run the end-to-end tests automatically on your forked project by followi ### Examples -As part of the repo you will find an examples folder at the root. This folder contains examples (written with CDK for now) of deployable AWS Lambda functions using Powertools. +As part of the repo you will find an examples folder at the root. This folder contains examples (written with CDK and SAM) of deployable AWS Lambda functions using Powertools. To test your updates with these examples, you just have to: -1. Build your local version of *aws-lambda-powertools-typescript* npm packages with `npm run lerna-package` -2. Update their references in examples +1. Build your local version of *aws-lambda-powertools-typescript* npm packages with `npm run lerna-package` while in the root folder +2. Move to the examples folder of your choice + ```sh + cd packages/examples/cdk + # or + cd packages/examples/sam ``` - cd examples/cdk +3. Update their references in examples + ```sh npm install ../../packages/**/dist/aws-lambda-powertools-* ``` -3. Run cdk tests - ``` +4. Run cdk tests + ```sh npm run test ``` -4. Deploy - ``` +5. Deploy + ```sh npm run cdk deploy + # or + sam build --beta-features + sam deploy --guided ``` The last command will deploy AWS resources, therefore, you will need an AWS account, and it might incur some costs which should be covered by the [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you don't have an AWS Account, follow [these instructions to create one](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/). diff --git a/README.md b/README.md index 43d43631f1..3537f7c608 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A suite of TypeScript utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools for [Python](https://github.com/awslabs/aws-lambda-powertools-python) and AWS Lambda Powertools for [Java](https://github.com/awslabs/aws-lambda-powertools-java) are also available). -**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk)** +**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples)** > **An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com** @@ -44,6 +44,7 @@ Each TypeScript utility is installed as standalone NPM package. ### Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk) +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam) * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk/src) * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples) * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples) diff --git a/docs/index.md b/docs/index.md index 48b60e850c..e00d1146ad 100644 --- a/docs/index.md +++ b/docs/index.md @@ -63,6 +63,7 @@ Each TypeScript utility is installed as standalone NPM package. ## Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk){target="_blank"} +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam){target="_blank"} * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk/lib){target="_blank"} * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples){target="_blank"} * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples){target="_blank"} diff --git a/packages/commons/README.md b/packages/commons/README.md index 05f9afe3dc..cc59a3fd64 100644 --- a/packages/commons/README.md +++ b/packages/commons/README.md @@ -7,7 +7,7 @@ A suite of TypeScript utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools for [Python](https://github.com/awslabs/aws-lambda-powertools-python) and AWS Lambda Powertools for [Java](https://github.com/awslabs/aws-lambda-powertools-java) are also available). -**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk)** +**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples)** > **An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com** @@ -35,6 +35,7 @@ Each TypeScript utility is installed as standalone NPM package. ### Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk) +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam) * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/tracing/examples) * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples) * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples) diff --git a/packages/logger/README.md b/packages/logger/README.md index b496f59408..c330f51cf0 100644 --- a/packages/logger/README.md +++ b/packages/logger/README.md @@ -7,7 +7,7 @@ A suite of TypeScript utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools for [Python](https://github.com/awslabs/aws-lambda-powertools-python) and AWS Lambda Powertools for [Java](https://github.com/awslabs/aws-lambda-powertools-java) are also available). -**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk)** +**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples)** > **An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com** @@ -36,6 +36,7 @@ Each TypeScript utility is installed as standalone NPM package. ### Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk) +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam) * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/tracing/examples) * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples) * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples) diff --git a/packages/metrics/README.md b/packages/metrics/README.md index 039cc93da2..ea429fe74e 100644 --- a/packages/metrics/README.md +++ b/packages/metrics/README.md @@ -7,7 +7,7 @@ A suite of TypeScript utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools for [Python](https://github.com/awslabs/aws-lambda-powertools-python) and AWS Lambda Powertools for [Java](https://github.com/awslabs/aws-lambda-powertools-java) are also available). -**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk)** +**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples)** > **An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com** @@ -35,6 +35,7 @@ Each TypeScript utility is installed as standalone NPM package. ### Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk) +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam) * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/tracing/examples) * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples) * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples) diff --git a/packages/tracing/README.md b/packages/tracing/README.md index f3fd5d58ed..9ba466aa27 100644 --- a/packages/tracing/README.md +++ b/packages/tracing/README.md @@ -7,7 +7,7 @@ A suite of TypeScript utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools for [Python](https://github.com/awslabs/aws-lambda-powertools-python) and AWS Lambda Powertools for [Java](https://github.com/awslabs/aws-lambda-powertools-java) are also available). -**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk)** +**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples)** > **An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com** @@ -35,6 +35,7 @@ Each TypeScript utility is installed as standalone NPM package. ### Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk) +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam) * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/tracing/examples) * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples) * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples) From 66a9d8a673dd882486856f7d71f9a5f5fc4a2c07 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 May 2022 12:12:56 +0000 Subject: [PATCH 02/12] chore: updated contributing & docs with SAM --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9b6c4d0184..f8f75393bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,6 +67,7 @@ The following tools need to be installed on your system prior to starting workin - [npm 8.x](https://www.npmjs.com/) - After installing Node.js, you can install `npm` with `npm install -g npm@next-8` - [AWS SAM CLI >= 1.39.0](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) + - AWS SAM CLI is a command line interface for AWS Serverless Application Model (SAM), it's used in one of the examples, and it's part of the pre-push hook. - [Docker](https://docs.docker.com/get-docker/) - If you are not planning on making changes to the documentation, you can skip this step. From fb25775436ad36d1e94769890e2d7765f2583f09 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 May 2022 12:14:10 +0000 Subject: [PATCH 03/12] chore: updated contributing & docs with SAM --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8f75393bb..b43f7b92fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -225,7 +225,7 @@ To test your updates with these examples, you just have to: sam deploy --guided ``` -The last command will deploy AWS resources, therefore, you will need an AWS account, and it might incur some costs which should be covered by the [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you don't have an AWS Account, follow [these instructions to create one](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/). +The last step will deploy AWS resources, therefore, you will need an AWS account, and it might incur some costs which should be covered by the [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you don't have an AWS Account, follow [these instructions to create one](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/). ### Local documentation From d853e2e6948b71f971e70abca0aa2f989f885317 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 May 2022 12:01:39 +0000 Subject: [PATCH 04/12] chore: updated contributing & docs with SAM --- CONTRIBUTING.md | 26 ++++++++++++++++++-------- README.md | 3 ++- docs/index.md | 1 + packages/commons/README.md | 3 ++- packages/logger/README.md | 3 ++- packages/metrics/README.md | 3 ++- packages/tracer/README.md | 3 ++- 7 files changed, 29 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 301a291d15..9b6c4d0184 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,6 +66,7 @@ The following tools need to be installed on your system prior to starting workin - If you use [nvm](https://github.com/nvm-sh/nvm#nvmrc) or [fnm](https://github.com/Schniz/fnm) you can install the latest LTS version with `nvm use` or `fnm use` respectively. Both will use the `.nvmrc` file in the project's root. - [npm 8.x](https://www.npmjs.com/) - After installing Node.js, you can install `npm` with `npm install -g npm@next-8` +- [AWS SAM CLI >= 1.39.0](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) - [Docker](https://docs.docker.com/get-docker/) - If you are not planning on making changes to the documentation, you can skip this step. @@ -77,6 +78,7 @@ cd aws-lambda-powertools-typescript npm ci; cd examples/cdk; npm ci cd ../.. +cd examples/sam; npm ci npm run init-environment ``` @@ -195,23 +197,31 @@ You can run the end-to-end tests automatically on your forked project by followi ### Examples -As part of the repo you will find an examples folder at the root. This folder contains examples (written with CDK for now) of deployable AWS Lambda functions using Powertools. +As part of the repo you will find an examples folder at the root. This folder contains examples (written with CDK and SAM) of deployable AWS Lambda functions using Powertools. To test your updates with these examples, you just have to: -1. Build your local version of *aws-lambda-powertools-typescript* npm packages with `npm run lerna-package` -2. Update their references in examples +1. Build your local version of *aws-lambda-powertools-typescript* npm packages with `npm run lerna-package` while in the root folder +2. Move to the examples folder of your choice + ```sh + cd packages/examples/cdk + # or + cd packages/examples/sam ``` - cd examples/cdk +3. Update their references in examples + ```sh npm install ../../packages/**/dist/aws-lambda-powertools-* ``` -3. Run cdk tests - ``` +4. Run cdk tests + ```sh npm run test ``` -4. Deploy - ``` +5. Deploy + ```sh npm run cdk deploy + # or + sam build --beta-features + sam deploy --guided ``` The last command will deploy AWS resources, therefore, you will need an AWS account, and it might incur some costs which should be covered by the [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you don't have an AWS Account, follow [these instructions to create one](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/). diff --git a/README.md b/README.md index 43d43631f1..3537f7c608 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A suite of TypeScript utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools for [Python](https://github.com/awslabs/aws-lambda-powertools-python) and AWS Lambda Powertools for [Java](https://github.com/awslabs/aws-lambda-powertools-java) are also available). -**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk)** +**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples)** > **An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com** @@ -44,6 +44,7 @@ Each TypeScript utility is installed as standalone NPM package. ### Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk) +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam) * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk/src) * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples) * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples) diff --git a/docs/index.md b/docs/index.md index 48b60e850c..e00d1146ad 100644 --- a/docs/index.md +++ b/docs/index.md @@ -63,6 +63,7 @@ Each TypeScript utility is installed as standalone NPM package. ## Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk){target="_blank"} +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam){target="_blank"} * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk/lib){target="_blank"} * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples){target="_blank"} * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples){target="_blank"} diff --git a/packages/commons/README.md b/packages/commons/README.md index 05f9afe3dc..cc59a3fd64 100644 --- a/packages/commons/README.md +++ b/packages/commons/README.md @@ -7,7 +7,7 @@ A suite of TypeScript utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools for [Python](https://github.com/awslabs/aws-lambda-powertools-python) and AWS Lambda Powertools for [Java](https://github.com/awslabs/aws-lambda-powertools-java) are also available). -**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk)** +**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples)** > **An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com** @@ -35,6 +35,7 @@ Each TypeScript utility is installed as standalone NPM package. ### Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk) +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam) * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/tracing/examples) * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples) * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples) diff --git a/packages/logger/README.md b/packages/logger/README.md index b496f59408..c330f51cf0 100644 --- a/packages/logger/README.md +++ b/packages/logger/README.md @@ -7,7 +7,7 @@ A suite of TypeScript utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools for [Python](https://github.com/awslabs/aws-lambda-powertools-python) and AWS Lambda Powertools for [Java](https://github.com/awslabs/aws-lambda-powertools-java) are also available). -**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk)** +**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples)** > **An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com** @@ -36,6 +36,7 @@ Each TypeScript utility is installed as standalone NPM package. ### Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk) +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam) * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/tracing/examples) * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples) * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples) diff --git a/packages/metrics/README.md b/packages/metrics/README.md index 039cc93da2..ea429fe74e 100644 --- a/packages/metrics/README.md +++ b/packages/metrics/README.md @@ -7,7 +7,7 @@ A suite of TypeScript utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools for [Python](https://github.com/awslabs/aws-lambda-powertools-python) and AWS Lambda Powertools for [Java](https://github.com/awslabs/aws-lambda-powertools-java) are also available). -**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk)** +**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples)** > **An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com** @@ -35,6 +35,7 @@ Each TypeScript utility is installed as standalone NPM package. ### Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk) +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam) * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/tracing/examples) * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples) * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples) diff --git a/packages/tracer/README.md b/packages/tracer/README.md index f3fd5d58ed..9ba466aa27 100644 --- a/packages/tracer/README.md +++ b/packages/tracer/README.md @@ -7,7 +7,7 @@ A suite of TypeScript utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools for [Python](https://github.com/awslabs/aws-lambda-powertools-python) and AWS Lambda Powertools for [Java](https://github.com/awslabs/aws-lambda-powertools-java) are also available). -**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk)** +**[📜 Documentation](https://awslabs.github.io/aws-lambda-powertools-typescript/)** | **[NPM](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://github.com/awslabs/aws-lambda-powertools-roadmap/projects/1)** | **[Examples](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples)** > **An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com** @@ -35,6 +35,7 @@ Each TypeScript utility is installed as standalone NPM package. ### Examples * [CDK](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/cdk) +* [SAM](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/examples/sam) * [Tracer](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/tracing/examples) * [Logger](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/logger/examples) * [Metrics](https://github.com/awslabs/aws-lambda-powertools-typescript/tree/main/packages/metrics/examples) From 5a8282bdbb1e376cfe594078b280b5bc5b719a26 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 May 2022 12:12:56 +0000 Subject: [PATCH 05/12] chore: updated contributing & docs with SAM --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9b6c4d0184..f8f75393bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,6 +67,7 @@ The following tools need to be installed on your system prior to starting workin - [npm 8.x](https://www.npmjs.com/) - After installing Node.js, you can install `npm` with `npm install -g npm@next-8` - [AWS SAM CLI >= 1.39.0](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) + - AWS SAM CLI is a command line interface for AWS Serverless Application Model (SAM), it's used in one of the examples, and it's part of the pre-push hook. - [Docker](https://docs.docker.com/get-docker/) - If you are not planning on making changes to the documentation, you can skip this step. From 5b0d678aff3afa16f615e01cd2e5037a27ac4b8a Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 May 2022 12:14:10 +0000 Subject: [PATCH 06/12] chore: updated contributing & docs with SAM --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8f75393bb..b43f7b92fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -225,7 +225,7 @@ To test your updates with these examples, you just have to: sam deploy --guided ``` -The last command will deploy AWS resources, therefore, you will need an AWS account, and it might incur some costs which should be covered by the [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you don't have an AWS Account, follow [these instructions to create one](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/). +The last step will deploy AWS resources, therefore, you will need an AWS account, and it might incur some costs which should be covered by the [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you don't have an AWS Account, follow [these instructions to create one](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/). ### Local documentation From 1ea4aa4472dd48373c557ca0bc420039d4f7fc11 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Fri, 13 May 2022 10:14:03 +0000 Subject: [PATCH 07/12] chore: add sam to gitpod --- .devcontainer/Dockerfile | 5 +++++ .devcontainer/devcontainer.json | 16 +++++++--------- .gitpod.yml | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1a7334ee80..26c8eecef2 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -11,5 +11,10 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # ARG EXTRA_NODE_VERSION=10 # RUN su node -c "umask 0002 && ./usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" +RUN wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip \ + && unzip aws-sam-cli-linux-x86_64.zip -d sam-installation \ + && sudo ./sam-installation/install \ + && rm -rf sam-installation aws-sam-cli-linux-* + # Global node modules RUN su node -c "npm install -g npm-check-updates npm@next-8" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b4f8c88210..51a9c57732 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,16 +5,16 @@ "build": { "dockerfile": "Dockerfile", // Update 'VARIANT' to pick a Node version: 16, 14, 12. - // Append -bullseye or -buster to pin to an OS version. - // Use -bullseye variants on local arm64/Apple Silicon. - "args": { "VARIANT": "14-bullseye" } + // Append -bullseye or -buster to pin to an OS version. + // Use -bullseye variants on local arm64/Apple Silicon. + "args": { + "VARIANT": "14-bullseye" + } }, - // Set *default* container specific settings.json values on container create. "settings": { "git.enableCommitSigning": true }, - // Add the IDs of extensions you want installed when the container is created. "extensions": [ "dbaeumer.vscode-eslint", @@ -25,10 +25,8 @@ "ms-vscode.vscode-typescript-tslint-plugin", "ms-azuretools.vscode-docker" ], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "npm ci; npm run lerna-ci; npm run init-environment", - + "postCreateCommand": "npm ci; cd examples/cdk; npm ci; cd ../sam; npm ci; cd ../../; npm run init-environment", // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "node" + "remoteUser": "node" } \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml index 65af352a5a..b6118a2f26 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,5 +1,5 @@ tasks: - - init: nvm install; nvm use; npm i -g npm@next-8; npm ci; npm run lerna-ci; npm run init-environment + - init: nvm install; nvm use; npm i -g npm@next-8; npm ci; cd examples/cdk; npm ci; cd ../sam; npm ci; cd ../../; npm run init-environment vscode: extensions: - dbaeumer.vscode-eslint From 8b41897a8f54f972624367c43e7a46e37c44c190 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Fri, 13 May 2022 16:26:15 +0000 Subject: [PATCH 08/12] chore: updated gitpod.yml --- .gitpod.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index b6118a2f26..5af015b271 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,5 +1,26 @@ tasks: - - init: nvm install; nvm use; npm i -g npm@next-8; npm ci; cd examples/cdk; npm ci; cd ../sam; npm ci; cd ../../; npm run init-environment + - init: | + # Install Nodejs version specified in .nvmrc + nvm install + nvm use + # Install npm 8.x + npm i -g npm@next-8 + # Install monorepo packages + npm ci + # Install CDK exampels dependencies + cd examples/cdk + npm ci + # Install SAM exampels dependencies + cd ../sam + npm ci + # Install AWS SAM CLI + wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip + unzip aws-sam-cli-linux-x86_64.zip -d sam-installation \ + sudo ./sam-installation/install \ + rm -rf sam-installation aws-sam-cli-linux-* + cd ../../ + # Setup husky hooks + npm run init-environment vscode: extensions: - dbaeumer.vscode-eslint From 5114d85e2f7492ad96aeae0cfc845d9b2642428c Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Fri, 13 May 2022 16:37:18 +0000 Subject: [PATCH 09/12] chore: updated gitpod.yml --- .gitpod.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 5af015b271..8ee88c88e2 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -15,8 +15,8 @@ tasks: npm ci # Install AWS SAM CLI wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip - unzip aws-sam-cli-linux-x86_64.zip -d sam-installation \ - sudo ./sam-installation/install \ + unzip aws-sam-cli-linux-x86_64.zip -d sam-installation + sudo ./sam-installation/install rm -rf sam-installation aws-sam-cli-linux-* cd ../../ # Setup husky hooks From fbe196c348079c33311ff20673ddab10772ce1a7 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Fri, 13 May 2022 16:41:33 +0000 Subject: [PATCH 10/12] chore: updated gitpod.yml --- .devcontainer/devcontainer.json | 2 +- .gitpod.yml | 2 +- CONTRIBUTING.md | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 51a9c57732..21513b4662 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -26,7 +26,7 @@ "ms-azuretools.vscode-docker" ], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "npm ci; cd examples/cdk; npm ci; cd ../sam; npm ci; cd ../../; npm run init-environment", + "postCreateCommand": "npm ci --foreground-scripts; cd examples/cdk; npm ci; cd ../sam; npm ci; cd ../../; npm run init-environment", // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "node" } \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml index 8ee88c88e2..52661379c7 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -6,7 +6,7 @@ tasks: # Install npm 8.x npm i -g npm@next-8 # Install monorepo packages - npm ci + npm ci --foreground-scripts # Install CDK exampels dependencies cd examples/cdk npm ci diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b43f7b92fb..8b6bace6b5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,6 +57,8 @@ reported the issue. Please try to include as much information as you can. Detail The following steps describe how to set up the AWS Lambda Powertools for TypeScript repository on your local machine. The alternative is to use a Cloud IDE like [Gitpod](https://www.gitpod.io/) or [Codespaces](https://github.com/features/codespaces) for your development. +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/awslabs/aws-lambda-powertools-typescript) + ### Setup The following tools need to be installed on your system prior to starting working on a pull request: @@ -76,7 +78,7 @@ First, [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the ```console git clone https://github.com/{your-account}/aws-lambda-powertools-typescript.git cd aws-lambda-powertools-typescript -npm ci; +npm ci --foreground-scripts; cd examples/cdk; npm ci cd ../.. cd examples/sam; npm ci From 37c659e9db143cf9d364b87a88d126428e62d33e Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Tue, 24 May 2022 16:05:20 +0200 Subject: [PATCH 11/12] Update CONTRIBUTING.md Co-authored-by: ijemmy --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8b6bace6b5..348e44cf11 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,7 +68,7 @@ The following tools need to be installed on your system prior to starting workin - If you use [nvm](https://github.com/nvm-sh/nvm#nvmrc) or [fnm](https://github.com/Schniz/fnm) you can install the latest LTS version with `nvm use` or `fnm use` respectively. Both will use the `.nvmrc` file in the project's root. - [npm 8.x](https://www.npmjs.com/) - After installing Node.js, you can install `npm` with `npm install -g npm@next-8` -- [AWS SAM CLI >= 1.39.0](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) +- [AWS SAM CLI >= 1.49.0](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) - AWS SAM CLI is a command line interface for AWS Serverless Application Model (SAM), it's used in one of the examples, and it's part of the pre-push hook. - [Docker](https://docs.docker.com/get-docker/) - If you are not planning on making changes to the documentation, you can skip this step. From a0b7aabcf6270fc8bdf0ce85a02b82a44d357adc Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Wed, 25 May 2022 09:51:54 +0200 Subject: [PATCH 12/12] Update .devcontainer/devcontainer.json Co-authored-by: Florian Chazal --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 21513b4662..074180aad9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,7 +8,7 @@ // Append -bullseye or -buster to pin to an OS version. // Use -bullseye variants on local arm64/Apple Silicon. "args": { - "VARIANT": "14-bullseye" + "VARIANT": "16-bullseye" } }, // Set *default* container specific settings.json values on container create.