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
Which Category is your question related to?
Auth + API
What AWS Services are you utilizing?
API Gateway, Lambda, Cognito, AWS Serverless Application Model + Cloudformation
Provide additional details e.g. code snippets
We're currently using the AWS Amplify client library while configuring our backend with AWS Serverless Application Model (SAM). I just wanted to confirm that our understanding of AWS Amplify's Authentication approach is correct:
Are the following two statements correct?:
To configure an API Gateway endpoint as a proxy to Lambda so that the Lambda function can access event.requestContext.identity.cognitoIdentityId, we need to add an Authorizer to the API Gateway. The Authorizer should have type: COGNITO_USER_POOLS. The Authorizer's header should be: "method.request.header.Authorization"
Without configuring the Authorizer, event.requestContext.identity.cognitoIdentityId will be null, even if AWSAmplify is the client. The Lambda proxy integration does not populate the identity field by default>
Which Category is your question related to?
Auth + API
What AWS Services are you utilizing?
API Gateway, Lambda, Cognito, AWS Serverless Application Model + Cloudformation
Provide additional details e.g. code snippets
We're currently using the AWS Amplify client library while configuring our backend with AWS Serverless Application Model (SAM). I just wanted to confirm that our understanding of AWS Amplify's Authentication approach is correct:
Are the following two statements correct?:
To configure an API Gateway endpoint as a proxy to Lambda so that the Lambda function can access
event.requestContext.identity.cognitoIdentityId
, we need to add an Authorizer to the API Gateway. The Authorizer should have type:COGNITO_USER_POOLS
. The Authorizer's header should be:"method.request.header.Authorization"
Without configuring the Authorizer,
event.requestContext.identity.cognitoIdentityId
will be null, even if AWSAmplify is the client. The Lambda proxy integration does not populate the identity field by default>Put together, something like this:
This upcoming PR should add the Authorizer functionality to SAM, as it does not currently exist.
aws/serverless-application-model#546
The text was updated successfully, but these errors were encountered: