Exception when triggering Lambda based API from Cloudwatch Events
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- aws, java, spring-boot
研究方向
從已記錄的 HttpApiV2ProxyRequest 反序列化失敗開始,並將已排程的 AWS CloudWatch Events payload 與 Java Spring Boot Lambda 整合所預期的 request 結構進行比較。當排程的呼叫不再引發所回報的例外,且預期的 API 行為發生時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
To help us debug your issue fill in the basic information below using the options provided
Serverless Java Container version: 1.5.1
Implementations: Spring Boot 2
Framework version: SpringBoot 2.2.6.RELEASE
Frontend service: AWS Cloudwatch Events
Deployment method: Console
Scenario
I'm trying to schedule a trigger for an API which I have written in Java and deployed in Lambda. Another purpose of this to avoid the cold start as I'm not using provisioned concurrency for my Lambda.
I'm not sure what event to pass so that my API gets triggered properly
Expected behavior
I expect the API endpoint to be hit at a specific time and it should do what is implemented
Actual behavior
Since I don't know what even to pass to my trigger so I'm gettings exceptions in my lambda cloudwatch logs
Steps to reproduce
No code sample required, just create any Java-based Spring boot API on lambda and attach a scheduled cloudwatch event to it.
It will give exceptions in the cloudwatch logs.
Full log output
2020-07-22 18:17:04.935 ERROR 1 --- [ main] c.a.s.proxy.AwsProxyExceptionHandler : Called exception handler for:
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "id" (class com.amazonaws.serverless.proxy.model.HttpApiV2ProxyRequest), not marked as ignorable (12 known properties: "requestContext", "rawQueryString", "body", "queryStringParameters", "isBase64Encoded", "routeKey", "version", "stageVariables", "rawPath", "cookies", "headers", "pathParameters"])
at [Source: (lambdainternal.util.NativeMemoryAsInputStream); line: 1, column: 22] (through reference chain: com.amazonaws.serverless.proxy.model.HttpApiV2ProxyRequest["id"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61) ~[task/:na]
- 主要語言
- Java
- 星號
- 1.6k
- 分支
- 575
- 平均合併
- 1 天 15 小時
- 30 天內合併 PR
- 12
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
aws/serverless-java-container 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
aws/serverless-java-container#1729 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
aws/serverless-java-container#1715 ·
維護者通常 1 天內回覆
-
Support for API Gateway mTLS clientCert field可能已有人在做 @2748109647 於 10 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 48/100
aws/serverless-java-container#1726 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 35/100
aws/serverless-java-container#1579 · 3 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 42/100
aws/serverless-java-container#1568 · 1 則留言 ·
維護者通常 1 天內回覆
查看 aws/serverless-java-container 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
ls1intum/thesis-management#1473 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
LunaDeerMC/Dominion#301 · 1 則留言 ·
-
[FEATURE] Expose external refresh, node-level translog and warmer stats可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉untriaged
難度 2/5 1-3 小時 新手友好度 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100