Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

279
Views
¿Qué hace context.done en AWS Lambda?

Estoy trabajando con una guía de AWS para Cognito.

La función de Lambda llama a context.done() con dos parámetros, null y event .

Estoy tratando de entender qué es el parámetro null y qué está haciendo context.done con el event que se le pasa.

 exports.handler = (event, context) => { if (event.request.session.length === 1 && event.request.session[0].challengeName === 'SRP_A') { event.response.issueTokens = false; event.response.failAuthentication = false; event.response.challengeName = 'CUSTOM_CHALLENGE'; } else if ( event.request.session.length === 2 && event.request.session[1].challengeName === 'CUSTOM_CHALLENGE' && event.request.session[1].challengeResult === true ) { event.response.issueTokens = true; event.response.failAuthentication = false; } else { event.response.issueTokens = false; event.response.failAuthentication = true; } context.done(null, event); };

He registrado en la consola el objeto de contexto, pero todavía no entiendo lo que está haciendo.

 2022-05-04T22:16:59.591Z 4c2609e6-69d7-4bd9-a25c-8527b7c6653a INFO { callbackWaitsForEmptyEventLoop: [Getter/Setter], succeed: [Function (anonymous)], fail: [Function (anonymous)], done: [Function (anonymous)], functionVersion: '$LATEST', functionName: 'cognito-define-auth-challenge', memoryLimitInMB: '128', logGroupName: '/aws/lambda/cognito-define-auth-challenge', logStreamName: '2022/05/04/[$LATEST]280e88c6f58545f8bc6e5d177c13cc5b', clientContext: undefined, identity: undefined, invokedFunctionArn: 'arn:aws:lambda:us-east-1:268280247265:function:cognito-define-auth-challenge', awsRequestId: '4c2609e6-69d7-4bd9-a25c-8527b7c6653a', getRemainingTimeInMillis: [Function: getRemainingTimeInMillis] }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!