Skip to content

Commit 97ffef4

Browse files
authored
Merge branch 'develop' into time2
2 parents 5338af3 + 8f44e49 commit 97ffef4

20 files changed

+363
-114
lines changed

.github/actionlint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
self-hosted-runner:
2+
labels:
3+
- aws-lambda-powertools_ubuntu-latest_4-core
4+
- aws-lambda-powertools_ubuntu-latest_8-core
5+
- aws-lambda-powertools_ubuntu-latest_16-core

.github/workflows/auto-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- name: Dependabot metadata
1616
id: metadata
17-
uses: dependabot/[email protected].4
17+
uses: dependabot/[email protected].5
1818
with:
1919
github-token: "${{ secrets.GITHUB_TOKEN }}"
2020
- name: Enable auto-merge for mypy-boto3 stubs Dependabot PRs

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [develop, v2]
5+
paths:
6+
- "aws_lambda_powertools/**"
7+
branches:
8+
- develop
69

710
jobs:
811
analyze:

.github/workflows/run-e2e-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
strategy:
2929
matrix:
3030
version: ["3.7", "3.8", "3.9"]
31+
if: ${{ github.actor != 'dependabot[bot]' }}
3132
steps:
3233
- name: "Checkout"
3334
uses: actions/checkout@v3

CHANGELOG.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,32 @@
66

77
## Documentation
88

9+
* project name consistency
10+
* **apigateway:** add all resolvers in testing your code section for accuracy ([#1688](https://github.com/awslabs/aws-lambda-powertools-python/issues/1688))
11+
* **examples:** linting unnecessary whitespace
12+
* **homepage:** update default value for `POWERTOOLS_DEV` ([#1695](https://github.com/awslabs/aws-lambda-powertools-python/issues/1695))
13+
14+
## Maintenance
15+
16+
* **ci:** revert custom hw for E2E due to lack of hw
17+
* **ci:** prevent dependabot updates to trigger E2E
18+
* **ci:** use new custom hw for E2E
19+
* **ci:** limit to src only to prevent dependabot failures
20+
* **deps:** bump dependabot/fetch-metadata from 1.3.4 to 1.3.5 ([#1689](https://github.com/awslabs/aws-lambda-powertools-python/issues/1689))
21+
* **deps-dev:** bump flake8-comprehensions from 3.10.0 to 3.10.1 ([#1699](https://github.com/awslabs/aws-lambda-powertools-python/issues/1699))
22+
* **deps-dev:** bump mkdocs-material from 8.5.7 to 8.5.9 ([#1697](https://github.com/awslabs/aws-lambda-powertools-python/issues/1697))
23+
* **deps-dev:** bump types-requests from 2.28.11.2 to 2.28.11.3 ([#1698](https://github.com/awslabs/aws-lambda-powertools-python/issues/1698))
24+
* **deps-dev:** bump pytest-benchmark from 3.4.1 to 4.0.0 ([#1659](https://github.com/awslabs/aws-lambda-powertools-python/issues/1659))
25+
* **deps-dev:** bump mypy-boto3-secretsmanager from 1.25.0 to 1.26.0.post1 ([#1691](https://github.com/awslabs/aws-lambda-powertools-python/issues/1691))
26+
* **deps-dev:** bump pytest-xdist from 2.5.0 to 3.0.2 ([#1655](https://github.com/awslabs/aws-lambda-powertools-python/issues/1655))
27+
* **deps-dev:** bump flake8-bugbear from 22.10.25 to 22.10.27 ([#1665](https://github.com/awslabs/aws-lambda-powertools-python/issues/1665))
28+
* **deps-dev:** bump mypy-boto3-ssm from 1.25.0 to 1.26.0.post1 ([#1690](https://github.com/awslabs/aws-lambda-powertools-python/issues/1690))
29+
30+
31+
<a name="v2.2.0"></a>
32+
## [v2.2.0] - 2022-11-07
33+
## Documentation
34+
935
* **homepage:** remove v1 layer limitation on pydantic not being included
1036
* **tracer:** add note on why X-Ray SDK over ADOT closes [#1675](https://github.com/awslabs/aws-lambda-powertools-python/issues/1675)
1137

@@ -16,6 +42,8 @@
1642

1743
## Maintenance
1844

45+
* update v2 layer ARN on documentation
46+
* **deps:** bump package to 2.2.0
1947
* **deps-dev:** bump aws-cdk-lib from 2.49.0 to 2.50.0 ([#1683](https://github.com/awslabs/aws-lambda-powertools-python/issues/1683))
2048
* **deps-dev:** bump mypy-boto3-dynamodb from 1.25.0 to 1.26.0.post1 ([#1682](https://github.com/awslabs/aws-lambda-powertools-python/issues/1682))
2149
* **deps-dev:** bump mypy-boto3-cloudformation from 1.25.0 to 1.26.0.post1 ([#1679](https://github.com/awslabs/aws-lambda-powertools-python/issues/1679))
@@ -2552,7 +2580,8 @@
25522580
* Merge pull request [#5](https://github.com/awslabs/aws-lambda-powertools-python/issues/5) from jfuss/feat/python38
25532581

25542582

2555-
[Unreleased]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v2.1.0...HEAD
2583+
[Unreleased]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v2.2.0...HEAD
2584+
[v2.2.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v2.1.0...v2.2.0
25562585
[v2.1.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v2.0.0...v2.1.0
25572586
[v2.0.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.31.1...v2.0.0
25582587
[v1.31.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.31.0...v1.31.1

docs/core/event_handler/api_gateway.md

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -562,19 +562,63 @@ your development, building, deployment tooling need to accommodate the distinct
562562

563563
## Testing your code
564564

565-
You can test your routes by passing a proxy event request where `path` and `httpMethod`.
565+
You can test your routes by passing a proxy event request with required params.
566566

567-
=== "assert_http_response.py"
567+
=== "API Gateway REST API"
568568

569-
```python hl_lines="21-24"
570-
--8<-- "examples/event_handler_rest/src/assert_http_response.py"
571-
```
569+
=== "assert_rest_api_resolver_response.py"
572570

573-
=== "assert_http_response_module.py"
571+
```python hl_lines="21-24"
572+
--8<-- "examples/event_handler_rest/src/assert_rest_api_resolver_response.py"
573+
```
574574

575-
```python
576-
--8<-- "examples/event_handler_rest/src/assert_http_response_module.py"
577-
```
575+
=== "assert_rest_api_response_module.py"
576+
577+
```python
578+
--8<-- "examples/event_handler_rest/src/assert_rest_api_response_module.py"
579+
```
580+
581+
=== "API Gateway HTTP API"
582+
583+
=== "assert_http_api_resolver_response.py"
584+
585+
```python hl_lines="21-29"
586+
--8<-- "examples/event_handler_rest/src/assert_http_api_resolver_response.py"
587+
```
588+
589+
=== "assert_http_api_response_module.py"
590+
591+
```python
592+
--8<-- "examples/event_handler_rest/src/assert_http_api_response_module.py"
593+
```
594+
595+
=== "Application Load Balancer"
596+
597+
=== "assert_alb_api_resolver_response.py"
598+
599+
```python hl_lines="21-24"
600+
--8<-- "examples/event_handler_rest/src/assert_alb_api_resolver_response.py"
601+
```
602+
603+
=== "assert_alb_api_response_module.py"
604+
605+
```python
606+
--8<-- "examples/event_handler_rest/src/assert_alb_api_response_module.py"
607+
```
608+
609+
=== "Lambda Function URL"
610+
611+
=== "assert_function_url_api_resolver_response.py"
612+
613+
```python hl_lines="21-29"
614+
--8<-- "examples/event_handler_rest/src/assert_function_url_api_resolver_response.py"
615+
```
616+
617+
=== "assert_function_url_api_response_module.py"
618+
619+
```python
620+
--8<-- "examples/event_handler_rest/src/assert_function_url_api_response_module.py"
621+
```
578622

579623
## FAQ
580624

docs/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ A suite of utilities for AWS Lambda functions to ease adopting best practices su
1818

1919
2) [**Share your work**](https://github.com/awslabs/aws-lambda-powertools-python/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!
2020

21-
3) Use [**Lambda Layers**](#lambda-layer) or [**SAR**](#sar), if possible. This helps us understand who uses Powertools in a non-intrusive way, and helps us gain future investments for other Lambda Powertools languages.
21+
3) Use [**Lambda Layers**](#lambda-layer) or [**SAR**](#sar), if possible. This helps us understand who uses Powertools in a non-intrusive way, and helps us gain future investments for other Powertools languages.
2222

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.
23+
When using Layers, you can add Powertools as a dev dependency (or as part of your virtual env) to not impact the development process.
2424

2525
## Install
2626

@@ -59,7 +59,7 @@ This means you need to add AWS SDK as a development dependency (not as a product
5959

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

62-
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.
62+
You can include 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.
6363

6464
??? note "Note: Click to expand and copy any regional Lambda Layer ARN"
6565

@@ -585,7 +585,7 @@ Compared with the [public Layer ARN](#lambda-layer) option, SAR allows you to ch
585585
value = data.aws_serverlessapplicationrepository_application.sar_app.semantic_version
586586
}
587587

588-
# Fetch Lambda Powertools Layer ARN from deployed SAR App
588+
# Fetch Powertools Layer ARN from deployed SAR App
589589
output "aws_lambda_powertools_layer_arn" {
590590
value = aws_serverlessapplicationrepository_cloudformation_stack.deploy_sar_stack.outputs.LayerVersionArn
591591
}
@@ -673,7 +673,7 @@ sam init --location https://github.com/aws-samples/cookiecutter-aws-sam-python
673673

674674
## Features
675675

676-
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.
676+
Core utilities such as Tracing, Logging, Metrics, and Event Handler will be available across all Powertools languages. Additional utilities are subjective to each language ecosystem and customer demand.
677677

678678
| Utility | Description |
679679
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -708,7 +708,7 @@ Core utilities such as Tracing, Logging, Metrics, and Event Handler will be avai
708708
| **POWERTOOLS_LOGGER_LOG_EVENT** | Logs incoming event | [Logging](./core/logger) | `false` |
709709
| **POWERTOOLS_LOGGER_SAMPLE_RATE** | Debug log sampling | [Logging](./core/logger) | `0` |
710710
| **POWERTOOLS_LOG_DEDUPLICATION_DISABLED** | Disables log deduplication filter protection to use Pytest Live Log feature | [Logging](./core/logger) | `false` |
711-
| **POWERTOOLS_DEV** | Increases verbosity across utilities | Multiple; see [POWERTOOLS_DEV effect below](#increasing-verbosity-across-utilities) | `0` |
711+
| **POWERTOOLS_DEV** | Increases verbosity across utilities | Multiple; see [POWERTOOLS_DEV effect below](#increasing-verbosity-across-utilities) | `false` |
712712
| **LOG_LEVEL** | Sets logging level | [Logging](./core/logger) | `INFO` |
713713

714714
### Optimizing for non-production environments
@@ -728,7 +728,7 @@ When `POWERTOOLS_DEV` is set to a truthy value (`1`, `true`), it'll have the fol
728728

729729
## Debug mode
730730

731-
As a best practice for libraries, AWS Lambda Powertools module logging statements are suppressed.
731+
As a best practice for libraries, Powertools module logging statements are suppressed.
732732

733733
When necessary, you can use `POWERTOOLS_DEBUG` environment variable to enable debugging. This will provide additional information on every internal operation.
734734

docs/tutorial/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Tutorial
33
description: Powertools introduction
44
---
55

6+
<!-- markdownlint-disable MD043 MD041 -->
7+
68
This tutorial progressively introduces Lambda Powertools core utilities by using one feature at a time.
79

810
## Requirements
@@ -343,7 +345,7 @@ Let's include Lambda Powertools as a dependency in `requirement.txt`, and use Ev
343345
=== "requirements.txt"
344346

345347
```bash
346-
aws-lambda-powertools
348+
aws-lambda-powertools[tracer] # Tracer requires AWS X-Ray SDK dependency
347349
```
348350

349351
Use `sam build && sam local start-api` and try run it locally again.

0 commit comments

Comments
 (0)