Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

85
Vistas
Is callback required in AWS Lambda handler?

What is the callback doing in lambda handler? It seems to be using sns variable and I intend to modify the variables.

exports.handler = function(event, context, callback) {
   console.log("AWS lambda and SNS trigger ");
   console.log(event);
   const sns = event.Records[0].Sns.Message;
   console.log(sns)
   callback(null, sns);   
};

I'm trying to modify the code to something like this and not sure what I should pass for callback. I also want to trigger another lambda and pass these new variables to it.

exports.handler = function(event, context, callback) {
   console.log("AWS lambda and SNS trigger ");
   console.log(event);
   const sns_NameSpace = event.Records[0].Sns.Message.Trigger.Namespace;
   const sns_ApiId = event.Records[0].Sns.Message.Trigger.Dimensions.value;
   const sns_MetricName = event.Records[0].Sns.Message.Trigger.MetricName;
   console.log(sns_ApiId + '_' + sns_MetricName)
   console.log(sns_NameSpace)   
   
   callback(null, sns); // Wondering what I should pass for the callback.
   
};
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you have configured SNS -> Lambda trigger, you don't need to do anything to the callback. SNS sends a message to a subscriber (in this case a Lambda function) exactly once and does not wait for a response from the subscriber.

And what exactly do you mean by 'another lambda'?

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda