Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-16772

Lambda: Using CamelAwsLambdaZipFile header fails at runtime

    XMLWordPrintable

    Details

    • QE Test Coverage:
      +
    • Regression Test:
      Automated

      Description

      According to the docs, you should be good to go with setting the zip file inside the message body or using s3 headers or CamelAwsLambdaZipFile header. when using the last option, it fails at runtime:

      [ com.test.MyApplication.main()] AbstractCamelContext           INFO  Apache Camel 3.10.0.fuse-800005-redhat-00001 (MyTimerCamel) started in 276ms (build:10ms init:65ms start:201ms)
      [erCamel) thread #0 - timer://x] DefaultErrorHandler            ERROR Failed delivery for (MessageId: CCAAEE88A20376E-0000000000000000 on ExchangeId: CCAAEE88A20376E-0000000000000000). Exhausted after delivery attempt: 1 caught: java.lang.IllegalArgumentException: At least S3 bucket/S3 key or zip file must be specified
      
      Message History (complete message history is disabled)
      ---------------------------------------------------------------------------------------------------------------------------------------
      RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
      [route1            ] [route1            ] [from[timer://x?repeatCount=1]                                                 ] [        22]
      	...
      [route1            ] [to1               ] [aws2-lambda://lambdaf1623850955012?accessKey=<accesskey>&secretKey=xx] [         0]
      
      Stacktrace
      ---------------------------------------------------------------------------------------------------------------------------------------
      
      java.lang.IllegalArgumentException: At least S3 bucket/S3 key or zip file must be specified
      	at org.apache.camel.component.aws2.lambda.Lambda2Producer.createFunction(Lambda2Producer.java:277) ~[camel-aws2-lambda-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.component.aws2.lambda.Lambda2Producer.process(Lambda2Producer.java:99) ~[camel-aws2-lambda-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66) [camel-support-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:172) [camel-core-processor-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:463) [camel-core-processor-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:179) [camel-base-engine-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:64) [camel-base-engine-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:184) [camel-core-processor-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:398) [camel-base-engine-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:209) [camel-timer-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:76) [camel-timer-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at java.util.TimerThread.mainLoop(Timer.java:556) [?:?]
      	at java.util.TimerThread.run(Timer.java:506) [?:?]
      [erCamel) thread #0 - timer://x] TimerConsumer                  WARN  Error processing exchange. Exchange[CCAAEE88A20376E-0000000000000000]. Caused by: [java.lang.IllegalArgumentException - At least S3 bucket/S3 key or zip file must be specified]
      java.lang.IllegalArgumentException: At least S3 bucket/S3 key or zip file must be specified
      	at org.apache.camel.component.aws2.lambda.Lambda2Producer.createFunction(Lambda2Producer.java:277) ~[camel-aws2-lambda-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.component.aws2.lambda.Lambda2Producer.process(Lambda2Producer.java:99) ~[camel-aws2-lambda-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66) ~[camel-support-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:172) ~[camel-core-processor-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:463) ~[camel-core-processor-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:179) [camel-base-engine-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:64) [camel-base-engine-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:184) [camel-core-processor-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:398) [camel-base-engine-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:209) [camel-timer-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:76) [camel-timer-3.10.0.fuse-800005-redhat-00001.jar:3.10.0.fuse-800005-redhat-00001]
      	at java.util.TimerThread.mainLoop(Timer.java:556) [?:?]
      	at java.util.TimerThread.run(Timer.java:506) [?:?]
      

      this check doesn't take the CamelAwsLambdaZipFile header into account

        Attachments

          Activity

            People

            Assignee:
            avano Andrej Vano
            Reporter:
            avano Andrej Vano
            Tester:
            Andrej Vano Andrej Vano
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: