From 24f54d2604e61a9aee0d1434ed2ee6e838b78a8e Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Fri, 5 Apr 2024 17:21:08 +0200 Subject: [PATCH 1/2] chore(docs): streamline docs homepage --- docs/index.md | 553 +++++++++++++++++++++++++++++--------------------- mkdocs.yml | 10 +- 2 files changed, 328 insertions(+), 235 deletions(-) diff --git a/docs/index.md b/docs/index.md index 47ea41e2b6..fab589fbbe 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,42 +3,259 @@ title: Homepage description: Powertools for AWS Lambda (TypeScript) --- -Powertools for AWS Lambda (TypeScript) is a developer toolkit to implement Serverless [best practices and increase developer velocity](#features). +Powertools for AWS Lambda (TypeScript) is a developer toolkit to implement Serverless best practices and increase developer velocity. -You can use Powertools for AWS Lambda (TypeScript) in both TypeScript and JavaScript code bases. +You can use Powertools for AWS Lambda in both TypeScript and JavaScript code bases. -???+ tip - Powertools for AWS Lambda is also available for [Python](https://docs.powertools.aws.dev/lambda/python/){target="_blank"}, [Java](https://docs.powertools.aws.dev/lambda/java/){target="_blank"}, and [.NET](https://docs.powertools.aws.dev/lambda/dotnet/){target="_blank"} + +
-??? hint "Support this project by becoming a reference customer, sharing your work, or using Layers :heart:" +- :material-battery-charging:{ .lg .middle } __Features__ - You can choose to support us in three ways: + --- - 1) [**Become a reference customer**](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=customer-reference&template=support_powertools.yml&title=%5BSupport+Lambda+Powertools%5D%3A+%3Cyour+organization+name%3E). This gives us permission to list your company in our documentation. + Adopt one, a few, or all industry practices. **Progressively**. - 2) [**Share your work**](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=community-content&template=share_your_work.yml&title=%5BI+Made+This%5D%3A+%3CTITLE%3E). Blog posts, video, sample projects you used Powertools! + [:octicons-arrow-right-24: All features](#features) - 3) Use [**Lambda Layers**](#lambda-layer), if possible. This helps us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way, and helps us gain future investments for other Powertools for AWS Lambda languages. +- :heart:{ .lg .middle } __Support this project__ - When using Layers, you can add Powertools for AWS Lambda (TypeScript) as a `devDependency` to not impact the development process. + --- + + Become a public reference customer, share your work, contribute, use Lambda Layers, etc. + + [:octicons-arrow-right-24: Support](#support-powertools-for-aws-lambda-python) + +- :material-file-code:{ .lg .middle } __Available languages__ + + --- + + Powertools for AWS Lambda is also available in other languages + + :octicons-arrow-right-24: [Python](https://docs.powertools.aws.dev/lambda/python/latest/){target="_blank" }, [Java](https://docs.powertools.aws.dev/lambda/java/){target="_blank"}, and [.NET](https://docs.powertools.aws.dev/lambda/dotnet/){target="_blank"} + +
## Install -You can install Powertools for AWS Lambda (TypeScript) using one of the following options: +You can use Powertools for AWS Lambda (TypeScript) by installing it with your favorite dependency management, or via Lambda Layers: -* **Lambda Layer**: [**arn:aws:lambda:{region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3**](#){: .copyMe}:clipboard: -* **npm**: [`npm install @aws-lambda-powertools/tracer @aws-lambda-powertools/metrics @aws-lambda-powertools/logger`](#){: .copyMe}:clipboard: +=== "npmjs.com" -### Lambda Layer + All features are available as individual packages, so you can install only the ones you need, for example: -??? warning "As of now, Container Image deployment (OCI) or inline Lambda functions do not support Lambda Layers" + * **Logger**: `npm i @aws-lambda-powertools/logger`{.copyMe}:clipboard: + * **Metrics**: `npm i @aws-lambda-powertools/metrics`{.copyMe}:clipboard: + * **Tracer**: `npm i @aws-lambda-powertools/tracer`{.copyMe}:clipboard: -[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html){target="_blank"} is a .zip file archive that can contain additional code, pre-packaged dependencies, data, or configuration files. Layers promote code sharing and separation of responsibilities so that you can iterate faster on writing business logic. + ### Extra dependencies -You can include Powertools for AWS Lambda (TypeScript) Lambda Layer using [AWS Lambda Console](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html#invocation-layers-using){target="_blank"}, or your preferred deployment framework. + Some features use additional dependencies like the AWS SDK for JavaScript v3, which might you need to install separately if you are using any of the features below: -??? note "Click to expand and copy any regional Lambda Layer ARN" + | Feature | Install | Default dependency | + | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------- | + | **[Tracer](./core/tracer.md#install)** | **`npm i @aws-lambda-powertools/tracer`**{.copyMe}:clipboard: | `aws-xray-sdk-core` | + | **[Idempotency](./utilities/idempotency.md#install)** | **`npm i @aws-lambda-powertools/idempotency @aws-sdk/client-dynamodb @aws-sdk/lib-dynamodb`**{.copyMe}:clipboard: | `jmespath` | + | **[Parameters (SSM)](./utilities/parameters.md#install)** | **`npm i @aws-lambda-powertools/parameters @aws-sdk/client-ssm`**{.copyMe}:clipboard: | | + | **[Parameters (Secrets Manager)](./utilities/parameters.md#install)** | **`npm i @aws-lambda-powertools/parameters @aws-sdk/client-secrets-manager`**{.copyMe}:clipboard: | | + | **[Parameters (AppConfig)](./utilities/parameters.md#install)** | **`npm i @aws-lambda-powertools/parameters @aws-sdk/client-appconfigdata`**{.copyMe}:clipboard: | | + | **[Parser](./utilities/parser.md#install)** | **`npm i @aws-lambda-powertools/parser zod@~3`**{.copyMe}:clipboard: | | + + +=== "Lambda Layer" + + You can add our layer both in the [AWS Lambda Console _(under `Layers`)_](https://eu-west-1.console.aws.amazon.com/lambda/home#/add/layer){target="_blank"}, or via your favorite infrastructure as code framework with the ARN value. + + For the latter, make sure to replace `{region}` with your AWS region, e.g., `eu-west-1`. + + __arn:aws:lambda:{region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3__{: .copyMe}:clipboard: + + ???+ note "Code snippets for popular infrastructure as code frameworks" + + === "CDK" + ```typescript hl_lines="14 20" + import { Stack } from 'aws-cdk-lib'; + import { Construct } from 'constructs'; + import { LayerVersion, Function, Runtime, Code } from 'aws-cdk-lib/aws-lambda'; + import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs'; + + export class SampleFunctionWithLayer extends Construct { + constructor(scope: Construct, id: string) { + super(scope, id); + + // Create a Layer with Powertools for AWS Lambda (TypeScript) + const powertoolsLayer = LayerVersion.fromLayerVersionArn( + this, + 'PowertoolsLayer', + `arn:aws:lambda:${Stack.of(this).region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3` + ); + + new Function(this, 'Function', { + runtime: Runtime.NODEJS_20_X, + // Add the Layer to a Lambda function + layers: [powertoolsLayer], + code: Code.fromInline(`...`), + handler: 'index.handler', + }); + } + } + ``` + + If you use `esbuild` to bundle your code, make sure to exclude `@aws-lambda-powertools` from being bundled since the packages will be already present the Layer: + + ```typescript + new NodejsFunction(this, 'Function', { + ... + bundling: { + externalModules: [ + '@aws-lambda-powertools/*', + '@aws-sdk/*', + ], + } + }); + ``` + + Check the [documentation](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs.BundlingOptions.html#externalmodules) for more details. + + === "SAM" + + ```yaml hl_lines="5" + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Layers: + - !Sub arn:aws:lambda:${AWS::Region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 + ``` + + If you use `esbuild` to bundle your code, make sure to exclude `@aws-lambda-powertools` from being bundled since the packages will be already present the Layer: + + ```yaml hl_lines="5-14" + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + ... + Metadata: + # Manage esbuild properties + BuildMethod: esbuild + BuildProperties: + Minify: true + External: + - '@aws-lambda-powertools/commons' + - '@aws-lambda-powertools/logger' + - '@aws-lambda-powertools/metrics' + - '@aws-lambda-powertools/tracer' + ``` + + Check the [documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-build-typescript.html) for more details. + + === "Serverless framework" + + ```yaml hl_lines="5" + functions: + hello: + handler: lambda_function.lambda_handler + layers: + - arn:aws:lambda:${aws:region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 + ``` + + If you use `esbuild` to bundle your code, make sure to exclude `@aws-lambda-powertools` from being bundled since the packages will be already present the Layer: + + ```yaml + custom: + esbuild: + external: + - '@aws-lambda-powertools/commons' + - '@aws-lambda-powertools/logger' + - '@aws-lambda-powertools/metrics' + - '@aws-lambda-powertools/tracer' + ``` + + Check the [documentation](https://floydspace.github.io/serverless-esbuild/) for more details. + + === "Terraform" + + ```terraform hl_lines="18" + terraform { + required_version = "~> 1.0.5" + required_providers { + aws = "~> 3.50.0" + } + } + + provider "aws" { + region = "{aws::region}" + } + + resource "aws_lambda_function" "test_lambda" { + filename = "lambda_function_payload.zip" + function_name = "lambda_function_name" + role = ... + handler = "index.handler" + runtime = "nodejs16.x" + layers = ["arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3"] + source_code_hash = filebase64sha256("lambda_function_payload.zip") + } + ``` + + === "Pulumi" + + ```typescript hl_lines="11" + import * as pulumi from '@pulumi/pulumi'; + import * as aws from '@pulumi/aws'; + + const role = new aws.iam.Role('role', { + assumeRolePolicy: aws.iam.assumeRolePolicyForPrincipal(aws.iam.Principals.LambdaPrincipal), + managedPolicyArns: [aws.iam.ManagedPolicies.AWSLambdaBasicExecutionRole] + }); + + const lambdaFunction = new aws.lambda.Function('function', { + layers: [ + pulumi.interpolate`arn:aws:lambda:${aws.getRegionOutput().name}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3` + ], + code: new pulumi.asset.FileArchive('lambda_function_payload.zip'), + tracingConfig: { + mode: 'Active' + }, + runtime: aws.lambda.Runtime.NodeJS16dX, + handler: 'index.handler', + role: role.arn, + architectures: ['x86_64'] + }); + ``` + + === "Amplify" + + ```zsh hl_lines="9 19" + # Create a new one with the layer + ❯ amplify add function + ? Select which capability you want to add: Lambda function (serverless function) + ? Provide an AWS Lambda function name: + ? Choose the runtime that you want to use: NodeJS + ? Do you want to configure advanced settings? Yes + ... + ? Do you want to enable Lambda layers for this function? Yes + ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 + ❯ amplify push -y + + # Updating an existing function and add the layer + ❯ amplify update function + ? Select the Lambda function you want to update test2 + General information + - Name: + ? Which setting do you want to update? Lambda layers configuration + ? Do you want to enable Lambda layers for this function? Yes + ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 + ? Do you want to edit the local lambda function now? No + ``` + + + +### Lambda Layer + +[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html){target="_blank"} is a `.zip` file archive that can contain additional code, pre-packaged dependencies, data, or configuration files. We compile and optimize [all dependencies](#install) to achieve an optimal build. + +??? note "Click to expand and copy any regional Lambda Layer ARN" | Region | Layer ARN | | ---------------- | ------------------------------------------------------------------------------------------------------------- | | `us-east-1` | [arn:aws:lambda:us-east-1:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3](#){: .copyMe}:clipboard: | @@ -69,206 +286,26 @@ You can include Powertools for AWS Lambda (TypeScript) Lambda Layer using [AWS L | `me-south-1` | [arn:aws:lambda:me-south-1:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3](#){: .copyMe}:clipboard: | | `il-central-1` | [arn:aws:lambda:il-central-1:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3](#){: .copyMe}:clipboard: | -??? note "Click to expand and copy code snippets for popular frameworks" - - === "SAM" - ```yaml hl_lines="5" - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Layers: - - !Sub arn:aws:lambda:${AWS::Region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 - ``` +**Want to inspect the contents of the Layer?** - If you use `esbuild` to bundle your code, make sure to exclude `@aws-lambda-powertools` from being bundled since the packages will be already present the Layer: +The pre-signed URL to download this Lambda Layer will be within `Location` key in the CLI output. The CLI output will also contain the Powertools for AWS Lambda version it contains. - ```yaml hl_lines="5-14" - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - ... - Metadata: - # Manage esbuild properties - BuildMethod: esbuild - BuildProperties: - Minify: true - External: - - '@aws-lambda-powertools/commons' - - '@aws-lambda-powertools/logger' - - '@aws-lambda-powertools/metrics' - - '@aws-lambda-powertools/tracer' - ``` - - Check the [documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-build-typescript.html) for more details. - - === "Serverless framework" - - ```yaml hl_lines="5" - functions: - hello: - handler: lambda_function.lambda_handler - layers: - - arn:aws:lambda:${aws:region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 - ``` - - If you use `esbuild` to bundle your code, make sure to exclude `@aws-lambda-powertools` from being bundled since the packages will be already present the Layer: - - ```yaml - custom: - esbuild: - external: - - '@aws-lambda-powertools/commons' - - '@aws-lambda-powertools/logger' - - '@aws-lambda-powertools/metrics' - - '@aws-lambda-powertools/tracer' - ``` - - Check the [documentation](https://floydspace.github.io/serverless-esbuild/) for more details. - - === "CDK" - - ```typescript hl_lines="13 19" - import * as cdk from 'aws-cdk-lib'; - import { Construct } from 'constructs'; - import * as lambda from 'aws-cdk-lib/aws-lambda'; - - export class SampleFunctionWithLayer extends Construct { - constructor(scope: Construct, id: string) { - super(scope, id); - - // Create a Layer with Powertools for AWS Lambda (TypeScript) - const powertoolsLayer = lambda.LayerVersion.fromLayerVersionArn( - this, - 'PowertoolsLayer', - `arn:aws:lambda:${cdk.Stack.of(this).region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3` - ); - - new lambda.Function(this, 'Function', { - runtime: lambda.Runtime.NODEJS_16_X, - // Add the Layer to a Lambda function - layers: [powertoolsLayer], - code: lambda.Code.fromInline(`...`), - handler: 'index.handler', - }); - } - } - ``` - - If you use `esbuild` to bundle your code, make sure to exclude `@aws-lambda-powertools` from being bundled since the packages will be already present the Layer: - - ```typescript - new awsLambdaNodejs.NodejsFunction(this, 'Function', { - ... - bundling: { - externalModules: [ - '@aws-lambda-powertools/commons', - '@aws-lambda-powertools/logger', - '@aws-lambda-powertools/metrics', - '@aws-lambda-powertools/tracer', - ], - } - }); - ``` - - Check the [documentation](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs.BundlingOptions.html#externalmodules) for more details. - - === "Terraform" - - ```terraform hl_lines="18" - terraform { - required_version = "~> 1.0.5" - required_providers { - aws = "~> 3.50.0" - } - } - - provider "aws" { - region = "{aws::region}" - } - - resource "aws_lambda_function" "test_lambda" { - filename = "lambda_function_payload.zip" - function_name = "lambda_function_name" - role = ... - handler = "index.handler" - runtime = "nodejs16.x" - layers = ["arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3"] - source_code_hash = filebase64sha256("lambda_function_payload.zip") - } - ``` - - === "Pulumi" - - ```typescript hl_lines="11" - import * as pulumi from '@pulumi/pulumi'; - import * as aws from '@pulumi/aws'; - - const role = new aws.iam.Role('role', { - assumeRolePolicy: aws.iam.assumeRolePolicyForPrincipal(aws.iam.Principals.LambdaPrincipal), - managedPolicyArns: [aws.iam.ManagedPolicies.AWSLambdaBasicExecutionRole] - }); - - const lambdaFunction = new aws.lambda.Function('function', { - layers: [ - pulumi.interpolate`arn:aws:lambda:${aws.getRegionOutput().name}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3` - ], - code: new pulumi.asset.FileArchive('lambda_function_payload.zip'), - tracingConfig: { - mode: 'Active' - }, - runtime: aws.lambda.Runtime.NodeJS16dX, - handler: 'index.handler', - role: role.arn, - architectures: ['x86_64'] - }); - ``` - - === "Amplify" - - ```zsh hl_lines="9 19" - # Create a new one with the layer - ❯ amplify add function - ? Select which capability you want to add: Lambda function (serverless function) - ? Provide an AWS Lambda function name: - ? Choose the runtime that you want to use: NodeJS - ? Do you want to configure advanced settings? Yes - ... - ? Do you want to enable Lambda layers for this function? Yes - ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 - ❯ amplify push -y - - # Updating an existing function and add the layer - ❯ amplify update function - ? Select the Lambda function you want to update test2 - General information - - Name: - ? Which setting do you want to update? Lambda layers configuration - ? Do you want to enable Lambda layers for this function? Yes - ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 - ? Do you want to edit the local lambda function now? No - ``` - -!!! info "Using Powertools for AWS Lambda (TypeScript) via Lambda Layer? Simply add the Powertools for AWS Lambda (TypeScript) utilities you are using as a development dependency" - -??? question "Want to inspect the contents of the Layer?" - Change {region} to your AWS region, e.g. `eu-west-1` - - ```bash title="AWS CLI" - aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 --region {region} - ``` - - The pre-signed URL to download this Lambda Layer will be within `Location` key. +Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the following command: + +```bash title="AWS CLI command to download Lambda Layer content" +aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 --region {aws::region} +``` ## Instrumentation -You can instrument your code with Powertools for AWS Lambda (TypeScript) in three different ways: +Many of the utilities provided by Powertools for AWS Lambda (TypeScript) can be used with different programming paradigms: * **Middy** middleware. It is the best choice if your existing code base relies on the [Middy 4.x](https://middy.js.org/docs/) middleware engine. Powertools for AWS Lambda (TypeScript) offers compatible Middy middleware to make this integration seamless. * **Method decorator**. Use [TypeScript method decorators](https://www.typescriptlang.org/docs/handbook/decorators.html#method-decorators) if you prefer writing your business logic using [TypeScript Classes](https://www.typescriptlang.org/docs/handbook/classes.html). If you aren’t using Classes, this requires the most significant refactoring. * **Manually**. It provides the most granular control. It’s the most verbose approach, with the added benefit of no additional dependency and no refactoring to TypeScript Classes. -The examples in this documentation will feature all the approaches described above, when applicable. +The examples in this documentation will feature all the approaches described above wherever applicable. ## Examples @@ -276,7 +313,6 @@ You can find examples of how to use Powertools for AWS Lambda (TypeScript) in th If instead you want to see Powertools for AWS Lambda (TypeScript) in slightly different use cases, check the [Serverless TypeScript Demo](https://github.com/aws-samples/serverless-typescript-demo) or the [AWS Lambda performance tuning](https://github.com/aws-samples/optimizations-for-lambda-functions) repository. Both demos use Powertools for AWS Lambda (TypeScript) as well as demonstrating other common techniques for Lambda functions written in TypeScript. - ## Features Core utilities such as Tracing, Logging, and Metrics will be available across all Powertools for AWS Lambda languages. Additional utilities are subjective to each language ecosystem and customer demand. @@ -313,42 +349,93 @@ Core utilities such as Tracing, Logging, and Metrics will be available across al Each Utility page provides information on example values and allowed values. -## How to support Powertools for AWS Lambda (TypeScript)? +## Support Powertools for AWS Lambda (TypeScript) + + +There are many ways you can help us gain future investments to improve everyone's experience: + +
+ +- :heart:{ .lg .middle } __Become a public reference__ + + --- + + Add your company name and logo on our [landing page](https://powertools.aws.dev), documentation, and README files. + + [:octicons-arrow-right-24: GitHub Issue template](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=customer-reference&projects=aws-powertools%2F7&template=support_powertools.yml&title=%5BSupport+Powertools+for+AWS+Lambda+%28TypeScript%29%5D%3A+%3Cyour+organization+name%3E){target="_blank"} + +- :mega:{ .lg .middle } __Share your work__ + + --- + + Blog posts, video, and sample projects about Powertools for AWS Lambda. + + [:octicons-arrow-right-24: GitHub Issue template](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=community-content&projects=aws-powertools%2F7&template=share_your_work.yml&title=%5BI+Made+This%5D%3A+%3CTITLE%3E){target="_blank"} + +- :partying_face:{ .lg .middle } __Join the community__ + + --- + + Connect, ask questions, and share what features you use. + + [:octicons-arrow-right-24: Discord invite](https://discord.gg/B8zZKbbyET){target="blank"} + +
### Becoming a reference customer -Knowing which companies are using this library is important to help prioritize the project internally. If your company is using Powertools for AWS Lambda (TypeScript), you can request to have your name and logo added to the README file by raising a [Support Powertools for AWS Lambda (TypeScript) (become a reference)](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=customer-reference&template=support_powertools.yml&title=%5BSupport+Lambda+Powertools%5D%3A+%3Cyour+organization+name%3E){target="_blank"} issue. +Knowing which companies are using this library is important to help prioritize the project internally. The following companies, among others, use Powertools: + +
+ +[**Hashnode**](https://hashnode.com/){target="_blank" rel="nofollow"} +{ .card } + +[**Trek10)**](https://www.trek10.com/){target="_blank" rel="nofollow"} +{ .card } + +[**Elva**](https://elva-group.com){target="_blank" rel="nofollow"} +{ .card } + +[**globaldatanet**](https://globaldatanet.com/){target="_blank" rel="nofollow"} +{ .card } + +[**Bailey Nelson**](https://www.baileynelson.com.au){target="_blank" rel="nofollow"} +{ .card } + +[**Perfect Post**](https://www.perfectpost.fr){target="_blank" rel="nofollow"} +{ .card } + +[**Sennder**](https://sennder.com/){target="_blank" rel="nofollow"} +{ .card } + +[**Certible**](https://www.certible.com/){target="_blank" rel="nofollow"} +{ .card } + +[**tecRacer GmbH & Co. KG**](https://www.tecracer.com/){target="_blank" rel="nofollow"} +{ .card } -The following companies, among others, use Powertools: +[**AppYourself**](https://appyourself.net){target="_blank" rel="nofollow"} +{ .card } -* [Hashnode](https://hashnode.com/){target="_blank"} -* [Trek10](https://www.trek10.com/){target="_blank"} -* [Elva](https://elva-group.com){target="_blank"} -* [globaldatanet](https://globaldatanet.com/){target="_blank"} -* [Bailey Nelson](https://www.baileynelson.com.au){target="_blank"} -* [Perfect Post](https://www.perfectpost.fr){target="_blank"} -* [Sennder](https://sennder.com/){target="_blank"} -* [Certible](https://www.certible.com/){target="_blank"} -* [tecRacer GmbH & Co. KG](https://www.tecracer.com/){target="_blank"} -* [AppYourself](https://appyourself.net){target="_blank"} -* [Alma Media](https://www.almamedia.fi){target="_blank"} +[**Alma Media**](https://www.almamedia.fi/en/){target="_blank" rel="nofollow} +{ .card } -### Sharing your work +
-Share what you did with Powertools for AWS Lambda (TypeScript) 💞💞. Blog post, workshops, presentation, sample apps and others. Check out what the community has already shared about Powertools for AWS Lambda (TypeScript) [here](we_made_this.md). +### Using Lambda Layers -### Using Lambda Layer +!!! note "Layers help us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way." -This helps us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way, and helps us gain future investments for other Powertools for AWS Lambda languages. When [using Layers](#lambda-layer), you can add Powertools for AWS Lambda (TypeScript) as a dev dependency (or as part of your virtual env) to not impact the development process. +When [using Layers](#lambda-layer), you can add Powertools for AWS Lambda (TypeScript) as a dev dependency to not impact the development process. For Layers, we pre-package all dependencies, compile and optimize for storage. ## Tenets These are our core principles to guide our decision making. -* **AWS Lambda only**. We optimise for AWS Lambda function environments and supported runtimes only. Utilities might work with web frameworks and non-Lambda environments, though they are not officially supported. -* **Eases the adoption of best practices**. The main priority of the utilities is to facilitate best practices adoption, as defined in the AWS Well-Architected Serverless Lens; all other functionality is optional. -* **Keep it lean**. Additional dependencies are carefully considered for security and ease of maintenance, and prevent negatively impacting startup time. -* **We strive for backwards compatibility**. New features and changes should keep backwards compatibility. If a breaking change cannot be avoided, the deprecation and migration process should be clearly defined. -* **We work backwards from the community**. We aim to strike a balance of what would work best for 80% of customers. Emerging practices are considered and discussed via Requests for Comment (RFCs) -* **Progressive**. Utilities are designed to be incrementally adoptable for customers at any stage of their Serverless journey. They follow language idioms and their community’s common practices. - +- __AWS Lambda only__. We optimise for AWS Lambda function environments and supported runtimes only. Utilities might work with web frameworks and non-Lambda environments, though they are not officially supported. +- __Eases the adoption of best practices__. The main priority of the utilities is to facilitate best practices adoption, as defined in the AWS Well-Architected Serverless Lens; all other functionality is optional. +- __Keep it lean__. Additional dependencies are carefully considered for security and ease of maintenance, and prevent negatively impacting startup time. +- __We strive for backwards compatibility__. New features and changes should keep backwards compatibility. If a breaking change cannot be avoided, the deprecation and migration process should be clearly defined. +- __We work backwards from the community__. We aim to strike a balance of what would work best for 80% of customers. Emerging practices are considered and discussed via Requests for Comment (RFCs) +- __Progressive__. Utilities are designed to be incrementally adoptable for customers at any stage of their Serverless journey. They follow language idioms and their community’s common practices. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 107ca2b45f..85d4bfe511 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -39,13 +39,13 @@ theme: primary: deep orange accent: deep orange toggle: - icon: material/toggle-switch-off-outline + icon: material/lightbulb name: Switch to dark mode - scheme: slate primary: deep orange accent: deep orange toggle: - icon: material/toggle-switch + icon: material/lightbulb-outline name: Switch to light mode features: - header.autohide @@ -58,6 +58,7 @@ theme: - content.code.annotate - content.code.copy - announce.dismiss + - content.tabs.link icon: repo: fontawesome/brands/github logo: media/aws-logo-light.svg @@ -66,8 +67,12 @@ theme: markdown_extensions: - admonition + - abbr - pymdownx.tabbed: alternate_style: true + slugify: !!python/object/apply:pymdownx.slugs.slugify + kwds: + case: lower - pymdownx.highlight: linenums: true - pymdownx.details @@ -80,6 +85,7 @@ markdown_extensions: permalink: true toc_depth: 4 - attr_list + - md_in_html - pymdownx.emoji: emoji_index: !!python/name:material.extensions.emoji.twemoji emoji_generator: !!python/name:material.extensions.emoji.to_svg From 1dba23db4f98fde088436e3bc39b7f197f3ebc66 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 8 Apr 2024 17:59:37 +0200 Subject: [PATCH 2/2] Update docs/index.md Co-authored-by: Alexander Schueren --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index fab589fbbe..a14d067a31 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,7 +24,7 @@ You can use Powertools for AWS Lambda in both TypeScript and JavaScript code bas Become a public reference customer, share your work, contribute, use Lambda Layers, etc. - [:octicons-arrow-right-24: Support](#support-powertools-for-aws-lambda-python) + [:octicons-arrow-right-24: Support](#support-powertools-for-aws-lambda-typescript) - :material-file-code:{ .lg .middle } __Available languages__