Class QPostToSQSLambda

java.lang.Object
com.kingsrook.qqq.utilitylambdas.QPostToSQSLambda
All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler

public class QPostToSQSLambda extends Object implements com.amazonaws.services.lambda.runtime.RequestStreamHandler
QQQ Utility Lambda to post input data to SQS. Requires environment variable: QUEUE_URL (e.g., https://sqs.us-east-0.amazonaws.com/111122223333/my-queue-name)
  • Field Details

    • context

      protected com.amazonaws.services.lambda.runtime.Context context
  • Constructor Details

    • QPostToSQSLambda

      public QPostToSQSLambda()
  • Method Details

    • handleRequest

      public void handleRequest(InputStream inputStream, OutputStream outputStream, com.amazonaws.services.lambda.runtime.Context context) throws IOException
      Entrypoint from AWS Lambda.
      Specified by:
      handleRequest in interface com.amazonaws.services.lambda.runtime.RequestStreamHandler
      Throws:
      IOException
    • log

      protected void log(String message)
      Write to the cloudwatch logs.
    • log

      protected void log(Throwable t)
    • writeResponse

      protected void writeResponse(OutputStream outputStream, String messageBody) throws IOException
      Throws:
      IOException