Skip to content

Commit 5140357

Browse files
Merge branch 'develop' into feature/add-appsync-parser-models
2 parents df04b2b + 9978a6c commit 5140357

11 files changed

Lines changed: 76 additions & 32 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
## Maintenance
88

9+
* **ci:** new pre-release 3.17.1a0 ([#6989](https://github.com/aws-powertools/powertools-lambda-python/issues/6989))
10+
* **deps-dev:** bump sentry-sdk from 2.32.0 to 2.33.0 ([#6988](https://github.com/aws-powertools/powertools-lambda-python/issues/6988))
11+
* **deps-dev:** bump aws-cdk-aws-lambda-python-alpha from 2.204.0a0 to 2.205.0a0 ([#6986](https://github.com/aws-powertools/powertools-lambda-python/issues/6986))
912

1013

1114
<a name="v3.17.0"></a>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Exposes version constant to avoid circular dependencies."""
22

3-
VERSION = "3.17.0"
3+
VERSION = "3.17.1a1"

aws_lambda_powertools/utilities/typing/lambda_context.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class LambdaContext:
3434
_aws_request_id: str
3535
_log_group_name: str
3636
_log_stream_name: str
37+
_tenant_id: str | None = None
3738
_identity: LambdaCognitoIdentity
3839
_client_context: LambdaClientContext
3940

@@ -75,14 +76,19 @@ def log_stream_name(self) -> str:
7576

7677
@property
7778
def identity(self) -> LambdaCognitoIdentity:
78-
"""(mobile apps) Information about the Amazon Cognito identity that authorized the request."""
79+
"""Information about the Amazon Cognito identity that authorized the request."""
7980
return self._identity
8081

8182
@property
8283
def client_context(self) -> LambdaClientContext:
83-
"""(mobile apps) Client context that's provided to Lambda by the client application."""
84+
"""Client context that's provided to Lambda by the client application."""
8485
return self._client_context
8586

87+
@property
88+
def tenant_id(self) -> str | None:
89+
"""The tenant_id"""
90+
return self._tenant_id
91+
8692
@staticmethod
8793
def get_remaining_time_in_millis() -> int:
8894
"""Returns the number of milliseconds left before the execution times out."""

docs/utilities/typing.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,18 @@ Using `LambdaContext` typing makes it possible to access information and hints o
4242
--8<-- "examples/typing/src/working_with_context_function.py"
4343
```
4444

45-
![Utilities Typing All](../media/utilities_typing_2.png)
46-
![Utilities Typing Specific](../media/utilities_typing_3.png)
45+
### Available properties and methods
46+
47+
| Name | Type | Description |
48+
| ------------------------------ | -------- | ------------------------------------------------------------------------- |
49+
| `function_name` | property | The name of the Lambda function |
50+
| `function_version` | property | The version of the function |
51+
| `invoked_function_arn` | property | The Amazon Resource Name (ARN) that's used to invoke the function |
52+
| `memory_limit_in_mb` | property | The amount of memory that's allocated for the function |
53+
| `aws_request_id` | property | The identifier of the invocation request |
54+
| `log_group_name` | property | The log group for the function |
55+
| `log_stream_name` | property | The log stream for the function instance |
56+
| `identity` | property | Information about the Amazon Cognito identity that authorized the request |
57+
| `client_context` | property | Client context that's provided to Lambda by the client application |
58+
| `tenant_id` | property | The tenant_id used to invoke the function |
59+
| `get_remaining_time_in_millis` | method | Returns the number of milliseconds left before the execution times out |

package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "aws-lambda-powertools-python-e2e",
33
"version": "1.0.0",
44
"devDependencies": {
5-
"aws-cdk": "^2.1020.2"
5+
"aws-cdk": "^2.1021.0"
66
}
77
}

poetry.lock

Lines changed: 37 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provenance/3.17.1a0/multiple.intoto.jsonl

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

provenance/3.17.1a1/multiple.intoto.jsonl

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "aws_lambda_powertools"
3-
version = "3.17.0"
3+
version = "3.17.1a1"
44
description = "Powertools for AWS Lambda (Python) is a developer toolkit to implement Serverless best practices and increase developer velocity."
55
authors = ["Amazon Web Services"]
66
include = ["aws_lambda_powertools/py.typed", "THIRD-PARTY-LICENSES"]
@@ -86,7 +86,7 @@ boto3 = "^1.26.164"
8686
isort = ">=5.13.2,<7.0.0"
8787
pytest-cov = ">=5,<7"
8888
pytest-mock = "^3.14.0"
89-
pytest-asyncio = ">=0.24,<0.27"
89+
pytest-asyncio = ">=0.24,<1.2"
9090
bandit = "^1.7.10"
9191
radon = "^6.0.1"
9292
xenon = "^0.9.3"

0 commit comments

Comments
 (0)