Skip to content

Commit

Permalink
refactor(logging): Rename to S3_OBJECT_LAMBDA
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brewer committed Mar 20, 2021
1 parent f334c6f commit ecf8ba0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aws_lambda_powertools/logging/correlation_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
APPSYNC_RESOLVER = 'request.headers."x-amzn-trace-id"'
APPLICATION_LOAD_BALANCER = 'headers."x-amzn-trace-id"'
EVENT_BRIDGE = "id"
S3_LAMBDA_OBJECT = "xAmzRequestId"
S3_OBJECT_LAMBDA = "xAmzRequestId"
4 changes: 2 additions & 2 deletions docs/utilities/data_classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,12 @@ This example is based on the AWS Blog post [Introducing Amazon S3 Object Lambda
```python hl_lines="4 8 10"
import requests
from aws_lambda_powertools import Logger
from aws_lambda_powertools.logging.correlation_paths import S3_LAMBDA_OBJECT
from aws_lambda_powertools.logging.correlation_paths import S3_OBJECT_LAMBDA
from aws_lambda_powertools.utilities.data_classes.s3_object_event import S3ObjectLambdaEvent

logger = Logger()

@logger.inject_lambda_context(correlation_id_path=S3_LAMBDA_OBJECT, log_event=True)
@logger.inject_lambda_context(correlation_id_path=S3_OBJECT_LAMBDA, log_event=True)
def lambda_handler(event, context):
event = S3ObjectLambdaEvent(event)

Expand Down

0 comments on commit ecf8ba0

Please sign in to comment.