Skip to content

Commit dfb97af

Browse files
Alexheitorlessa
Alex
andauthored
docs: add info about extras layer (#260)
* docs: add info about extras layer * docs: cleanup * Update docs/content/index.mdx Co-authored-by: Heitor Lessa <heitor.lessa@hotmail.com>
1 parent 1131541 commit dfb97af

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,14 @@ 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+
33+
> **NOTE**: Extras layer support does not support Python 3.6 runtime. This layer is also includes all extra dependencies and is 22.4MB zipped, ~155MB unzipped big.
3134
3235
App | ARN
3336
----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------
3437
[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
38+
[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
3539

3640
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.
3741

@@ -41,16 +45,18 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
4145
Properties:
4246
Location:
4347
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
48+
SemanticVersion: 1.9.0 # change to latest semantic version available in SAR
4549
```
4650
51+
4752
This will add a nested app stack with an output parameter `LayerVersionArn`, that you can reference inside your Lambda function definition:
4853

4954
```yaml
5055
Layers:
5156
- !GetAtt AwsLambdaPowertoolsPythonLayer.Outputs.LayerVersionArn
5257
```
5358

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)