You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Used when building an [AWS_LAMBDA Authorization](https://docs.aws.amazon.com/appsync/latest/devguide/security-authz.html#aws-lambda-authorization){target="_blank"} with AppSync.
137
+
See blog post [Introducing Lambda authorization for AWS AppSync GraphQL APIs](https://aws.amazon.com/blogs/mobile/appsync-lambda-auth/){target="_blank"}
138
+
or read the Amplify documentation on using [AWS Lambda for authorization](https://docs.amplify.aws/lib/graphqlapi/authz/q/platform/js#aws-lambda){target="_blank"} with AppSync.
139
+
140
+
In this example extract the `requestId` as the `correlation_id` for logging and builds the AppSync authorizer
141
+
using the `AppSyncAuthorizerResponse` helper.
142
+
143
+
=== "app.py"
144
+
145
+
```python
146
+
from typing import Dict
147
+
148
+
from aws_lambda_powertools.logging import correlation_paths
149
+
from aws_lambda_powertools.logging.logger import Logger
150
+
from aws_lambda_powertools.utilities.data_classes.appsync_authorizer_event import (
151
+
AppSyncAuthorizerEvent,
152
+
AppSyncAuthorizerResponse,
153
+
)
154
+
from aws_lambda_powertools.utilities.data_classes.event_source import event_source
0 commit comments