Skip to content

Commit 999cdff

Browse files
committed
docs(layer): update to 1.25.6; cosmetic changes
1 parent 2357c06 commit 999cdff

File tree

1 file changed

+50
-36
lines changed

1 file changed

+50
-36
lines changed

docs/index.md

Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,26 @@ title: Homepage
33
description: AWS Lambda Powertools Python
44
---
55

6-
A suite of utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more.
6+
A suite of utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, idempotency, batching, and more.
77

88
???+ tip "Tip: Looking for a quick read through how the core features are used?"
99

1010
Check out [this detailed blog post](https://aws.amazon.com/blogs/opensource/simplifying-serverless-best-practices-with-lambda-powertools/) with a practical example.
1111

12-
## Tenets
13-
14-
Core utilities such as Tracing, Logging, Metrics, and Event Handler will be available across all Lambda Powertools runtimes. Additional utilities are subjective to each language ecosystem and customer demand.
15-
16-
* **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.
17-
* **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.
18-
* **Keep it lean**. Additional dependencies are carefully considered for security and ease of maintenance, and prevent negatively impacting startup time.
19-
* **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.
20-
* **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)
21-
* **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.
2212

2313
## Install
2414

2515
Powertools is available in the following formats:
2616

27-
* **Lambda Layer**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:**](#){: .copyMe}
17+
* **Lambda Layer**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:**](#){: .copyMe}
2818
* **PyPi**: **`pip install aws-lambda-powertools`**
2919

20+
???+ hint "Support this project by using Lambda Layers :heart:"
21+
Lambda Layers allow us to understand who uses this library in a non-intrusive way. This helps us justify and gain future investments for other Lambda Powertools languages.
22+
23+
When using Layers, you can add Lambda Powertools as a dev dependency (or as part of your virtual env) to not impact the development process.
24+
25+
3026
### Lambda Layer
3127

3228
[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.
@@ -37,23 +33,28 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
3733

3834
| Region | Layer ARN
3935
|--------------------------- | ---------------------------
40-
| `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
41-
| `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
42-
| `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
43-
| `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
44-
| `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
45-
| `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
46-
| `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
47-
| `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
48-
| `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
49-
| `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
50-
| `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
51-
| `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
52-
| `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
53-
| `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
54-
| `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
55-
| `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
56-
| `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPython:15 :clipboard:](#){: .copyMe}
36+
| `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
37+
| `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
38+
| `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
39+
| `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
40+
| `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
41+
| `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
42+
| `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
43+
| `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
44+
| `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
45+
| `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
46+
| `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
47+
| `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
48+
| `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
49+
| `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
50+
| `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
51+
| `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
52+
| `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPython:16 :clipboard:](#){: .copyMe}
53+
54+
??? question "Can't find our Lambda Layer for your preferred AWS region?"
55+
You can use [Serverless Application Repository (SAR)](#sar) method, our [CDK Layer Construct](https://github.com/aws-samples/cdk-lambda-powertools-python-layer){target="_blank"}, or PyPi like you normally would for any other library.
56+
57+
Please do file a feature request with the region you'd want us to prioritize making our Lambda Layer available.
5758

5859
=== "SAM"
5960

@@ -62,7 +63,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
6263
Type: AWS::Serverless::Function
6364
Properties:
6465
Layers:
65-
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:15
66+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:16
6667
```
6768

6869
=== "Serverless framework"
@@ -72,7 +73,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
7273
hello:
7374
handler: lambda_function.lambda_handler
7475
layers:
75-
- arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPython:15
76+
- arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPython:16
7677
```
7778

7879
=== "CDK"
@@ -88,7 +89,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
8889
powertools_layer = aws_lambda.LayerVersion.from_layer_version_arn(
8990
self,
9091
id="lambda-powertools",
91-
layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPython:15"
92+
layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPython:16"
9293
)
9394
aws_lambda.Function(self,
9495
'sample-app-lambda',
@@ -137,7 +138,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
137138
role = aws_iam_role.iam_for_lambda.arn
138139
handler = "index.test"
139140
runtime = "python3.9"
140-
layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:15"]
141+
layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:16"]
141142

142143
source_code_hash = filebase64sha256("lambda_function_payload.zip")
143144
}
@@ -156,7 +157,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
156157
? Do you want to configure advanced settings? Yes
157158
...
158159
? Do you want to enable Lambda layers for this function? Yes
159-
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:15
160+
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:16
160161
❯ amplify push -y
161162

162163

@@ -167,15 +168,15 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
167168
- Name: <NAME-OF-FUNCTION>
168169
? Which setting do you want to update? Lambda layers configuration
169170
? Do you want to enable Lambda layers for this function? Yes
170-
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:15
171+
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:16
171172
? Do you want to edit the local lambda function now? No
172173
```
173174

174175
=== "Get the Layer .zip contents"
175176
Change {region} to your AWS region, e.g. `eu-west-1`
176177

177178
```bash title="AWS CLI"
178-
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:15 --region {region}
179+
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:16 --region {region}
179180
```
180181

181182
The pre-signed URL to download this Lambda Layer will be within `Location` key.
@@ -411,6 +412,8 @@ sam init --location https://github.com/aws-samples/cookiecutter-aws-sam-python
411412

412413
## Features
413414

415+
Core utilities such as Tracing, Logging, Metrics, and Event Handler will be available across all Lambda Powertools languages. Additional utilities are subjective to each language ecosystem and customer demand.
416+
414417
| Utility | Description
415418
| ------------------------------------------------- | ---------------------------------------------------------------------------------
416419
[Tracing](./core/tracer.md) | Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions
@@ -458,3 +461,14 @@ set_package_logger() # (1)
458461
```
459462

460463
1. :information_source: this will configure our `aws_lambda_powertools` logger with debug.
464+
465+
## Tenets
466+
467+
These are our core principles to guide our decision making.
468+
469+
* **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.
470+
* **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.
471+
* **Keep it lean**. Additional dependencies are carefully considered for security and ease of maintenance, and prevent negatively impacting startup time.
472+
* **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.
473+
* **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)
474+
* **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.

0 commit comments

Comments
 (0)