Skip to content

Commit ed321b3

Browse files
author
Alex Melnyk
committed
docs: add info about extras layer
1 parent 1131541 commit ed321b3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/content/index.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ sam init --location https://github.com/aws-samples/cookiecutter-aws-sam-python
2828
### Lambda Layer
2929

3030
Powertools is also available as a Lambda Layer. It is distributed via the [AWS Serverless Application Repository (SAR)](https://docs.aws.amazon.com/serverlessrepo/latest/devguide/what-is-serverlessrepo.html).
31+
We have two layers available, one with core dependencies `aws-lambda-powertools-python-layer` and one with extras `aws-lambda-powertools-python-layer-extras` such as `pydantic` which is required for the parser.
32+
The extras layer is 22.4MB zipped and ~155MB unzipped big.
3133

3234
App | ARN
3335
----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------
3436
[aws-lambda-powertools-python-layer](https://serverlessrepo.aws.amazon.com/applications/eu-west-1/057560766410/aws-lambda-powertools-python-layer) | arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
37+
[aws-lambda-powertools-python-layer-extras](https://serverlessrepo.aws.amazon.com/applications/eu-west-1/057560766410/aws-lambda-powertools-python-layer-extras) | arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-extras
3538

3639
If using SAM, you can include this SAR App as part of your shared Layers stack, and lock to a specific semantic version. Once deployed, it'll be available across the account this is deployed to.
3740

@@ -41,16 +44,19 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
4144
Properties:
4245
Location:
4346
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
44-
SemanticVersion: 1.3.1 # change to latest semantic version available in SAR
47+
SemanticVersion: 1.9.0 # change to latest semantic version available in SAR
4548
```
4649
50+
4751
This will add a nested app stack with an output parameter `LayerVersionArn`, that you can reference inside your Lambda function definition:
4852

4953
```yaml
5054
Layers:
5155
- !GetAtt AwsLambdaPowertoolsPythonLayer.Outputs.LayerVersionArn
5256
```
5357

58+
The layer for the co
59+
5460
Here is the list of IAM permissions that you need to add to your deployment IAM role to use the layer:
5561

5662
```yaml

0 commit comments

Comments
 (0)