Comments (2)
It is my understanding that the HTTP Status Code reflects the state of the call to AWS Lambda, not the success/failure of the code running within the Lambda invocation.
The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, limit errors, or issues with your function's code and configuration. For example, Lambda returns TooManyRequestsException if executing the function would cause you to exceed a concurrency limit at either the account level (ConcurrentInvocationLimitExceeded) or function level (ReservedFunctionConcurrentInvocationLimitExceeded).
from https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html
I've seen the Lambda java client re-throw uncaught exceptions from the Lambda function invocation as a LambdaInvocationException. This seems to suggest that there is some application level protocol for serializing the exception from within the Lambda invocation.
In fact, this page seems to show how Lambda functions (written in Java) handle uncaught exceptions:
Expected payload format when encountering an uncaught exception:
{
"errorMessage": "Name John Doe is invalid. Exception occurred...",
"errorType": "java.lang.Exception",
"stackTrace": [
"example.Hello.handler(Hello.java:9)",
"sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
"sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
"java.lang.reflect.Method.invoke(Method.java:497)"
]
}
from this page: https://docs.aws.amazon.com/lambda/latest/dg/java-exceptions.html
Alternatively, many of the docs seems to suggest you can get custom HTTP Status Codes by using API Gateway in front of your Lambda function. It has been a while since I looked closely at API Gateway by they did not support sufficiently long timeouts or request/response payload sizes to be advisable in conjunction with Query Federation.
I'll see what else I can find but I also don't see a way to affect the HTTP Status Codes from the Java interface our Lambda's implement.
from aws-athena-query-federation.
Closing per chat with @grundprinzip . @grundprinzip please reopen if you are still blocked.
from aws-athena-query-federation.
Related Issues (20)
- [BUG] Lambda S3 artifact too big for connector "athena-snowflake" (failed Lambda deployments) HOT 6
- [FEATURE] Integrate AWS Parameters and Secrets Lambda Extension to Lambdas that retrieve Secrets
- [BUG] Unable to push down predicates for NESTED data type from Athena to Lambda connector
- [QUESTION] No suitable driver found for mysql 8.0.28 HOT 1
- [BUG] Error while checking bucket ownership with connector athena-federation-jdbc to mysql HOT 1
- [BUG] Query Bigquery with Bigquery connector HOT 6
- Missing results if query by partition key but not sort key of GSI with connector DynamoDB HOT 1
- [BUG] Inaccurate results with connector snowflake when data scanned exceeds threshold in aggregate functions HOT 1
- [QUESTION] How to integrate Clickhouse DB with Athena MySQL Connector HOT 2
- [BUG] error occurs when using the LIMIT clause with AthenaGoogleBigQueryConnector HOT 3
- [BUG] TYPE_NOT_FOUND: Unknown type: row with connector DocumentDB HOT 2
- [BUG] Response payload size exceeded maximum allowed payload size with connector athena-udfs
- [BUG] ValidationException occurs when you query with a condition using TIMESTAMP or DATE types with connector for Timestream HOT 1
- [BUG] Failed to build project "mvn clean install" HOT 5
- [QUESTION] Getting error - Client's SerDe is not upgraded to latest version, defaulting to V4 HOT 1
- [BUG] where filter in athena returns 0 records and disable_projection_and_casing set to always with connector DynamoDB HOT 3
- [BUG] Using WHERE with date column returns 0 results with connector Athena DynamoDB HOT 2
- Fully qualified table function names for federated query passthrough HOT 1
- [BUG] Redshift Serverless SDK missing in connector athena-redshift
- [FEATURE] Migrate to AWS Java SDK v2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-athena-query-federation.