Skip to content

chore(docs): updated layer info #1358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ You can use Powertools in both TypeScript and JavaScript code bases.

## Install

Powertools is available in the following formats:
You can install Powertools using one of the following options:

* **Lambda Layer**: [**arn:aws:lambda:{region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:9**](#){: .copyMe}:clipboard:
* **npm**: **`npm install @aws-lambda-powertools/tracer @aws-lambda-powertools/metrics @aws-lambda-powertools/logger`**
* **npm**: [`npm install @aws-lambda-powertools/tracer @aws-lambda-powertools/metrics @aws-lambda-powertools/logger`](#){: .copyMe}:clipboard:

### Lambda Layer

???+ warning "As of now, Container Image deployment (OCI) or inline Lambda functions do not support Lambda Layers."

[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.

You can include Lambda Powertools 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.
Expand Down Expand Up @@ -245,17 +247,16 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
? Do you want to edit the local lambda function now? No
```

=== "Get the Layer .zip contents"
```bash title="AWS CLI"
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:9 --region {region}
```

The pre-signed URL to download this Lambda Layer will be within `Location` key.
!!! info "Using Powertools via Lambda Layer? Simply add the Powertools utilities you are using as a development dependency."

???+ warning "Warning: Limitations"
??? question "Want to inspect the contents of the Layer?"
Change {region} to your AWS region, e.g. `eu-west-1`

Container Image deployment (OCI) or inline Lambda functions do not support Lambda Layers.
```bash title="AWS CLI"
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:9 --region {region}
```

The pre-signed URL to download this Lambda Layer will be within `Location` key.

## Instrumentation

Expand Down