The incoming event in an AWS Lambda Function is always null when the first invocation runs (cold start), but is populated in subsequent invocations (warm start) #20732
Labels
area/amazon-lambda
kind/bug
Something isn't working
triage/duplicate
This issue or pull request already exists
Milestone
Describe the bug
The issue is present when running the function in a native build only when a new lambda container instance is started (e.g. A new output to the CloudWatch logs), but goes away when more events come in and the same lambda container instance is re-used for subsequent invocations. The issue is NOT present when deploying using the Java11 runtime.
The issue has been noticed when subscribing a Lambda function to an SNS topic and when subscribing to an SQSQueue, which in turn is subscribed to an SNS topic.
I haven't crossed checked, but I believe this issue hasn't been experienced in previous deployments of Quarkus (1.11.3.Final and 2.1.3.Final) since a similar setup was used when deploying in native mode.
Expected behavior
The incoming event to be populated on all invocations without having to have a warmed up lambda instance.
Actual behavior
Cloud watch logs:
In native, when cold starting a lambda request
In native, when warm starting a lambda request. Also cold/warm start when using the Java11 runtime.
How to Reproduce?
The source code is in a private repository so I can't provide a link for it, but I've included relevant snippets in the additional info section. Any more details are required let me know and I'll be glad to get them for you.
Steps to reproduce:
Output of
uname -a
orver
x86_64 GNU/Linux (AWS Lambda)
Output of
java -version
java 11.0.11 2021-04-20 LTS
GraalVM version (if different from Java)
GraalVM EE 21.1.0 (build 11.0.11+9-LTS-jvmci-21.1-b05)
Quarkus version or git rev
2.3.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.1
Additional information
Sample Function
Maven Snippet
AWS Cloud Formation Snippet
The text was updated successfully, but these errors were encountered: